MessageDialog
Object Hierarchy:
Description:
MessageDialog is an elementary OS styled dialog used to display a message to the user.
The class itself is similar to it's Gtk equivalent Gtk.MessageDialog but follows elementary OS design conventions.
See The Human Interface Guidelines for dialogs for more detailed disscussion on the dialog wording and design.
Example
var message_dialog = new Granite.MessageDialog.with_image_from_icon_name (
"This is a primary text",
"This is a secondary, multiline, long text. This text usually extends the primary text and prints e.g: the details of an error.",
"applications-development",
Gtk.ButtonsType.CLOSE
);
var custom_widget = new Gtk.CheckButton.with_label ("Custom widget");
custom_widget.show ();
message_dialog.custom_bin.add (custom_widget);
message_dialog.run ();
message_dialog.destroy ();
Namespace: Granite
Package: granite
Content:
Properties:
- public Icon badge_icon { owned get; set; }
The GLib.Icon that is used to display a badge, bottom-end aligned, over the image on the left side of the dialog.
- public ButtonsType buttons { construct; }
The Gtk.ButtonsType value to display a set of buttons in the dialog.
- public Bin custom_bin { get; construct; }
The custom area to add custom widgets.
- public Icon image_icon { owned get; set; }
The GLib.Icon that is used to display the image on the left side of the dialog.
- public Label primary_label { get; construct; }
The Gtk.Label that displays the Granite.MessageDialog.primary_text.
- public string primary_text { get; set; }
The primary text, title of the dialog.
- public Label secondary_label { get; construct; }
The Gtk.Label that displays the Granite.MessageDialog.secondary_text.
- public string secondary_text { get; set; }
The secondary text, body of the dialog.
Creation methods:
- public MessageDialog (string primary_text, string secondary_text, Icon image_icon, ButtonsType buttons = CLOSE)
Constructs a new Granite.MessageDialog. See Granite.Dialog for more details.
- public MessageDialog.with_image_from_icon_name (string primary_text, string secondary_text, string image_icon_name = "dialog-information", ButtonsType buttons = CLOSE)
Constructs a new Granite.MessageDialog with an icon name as it's icon displayed in the image. This constructor is same as the main one but with a difference that you can pass an icon name string instead of manually creating the GLib.Icon.
Methods:
- public void show_error_details (string error_message)
Shows a terminal-like widget for error details that can be expanded by the user.
Inherited Members:
All known members inherited from class Granite.Dialog
All known members inherited from class Gtk.Dialog
All known members inherited from class Gtk.Window
- accept_focus
- activate_default
- activate_focus
- activate_key
- add_accel_group
- add_mnemonic
- application
- attached_to
- begin_move_drag
- begin_resize_drag
- close
- decorated
- default_height
- default_width
- deiconify
- deletable
- destroy_with_parent
- enable_debugging
- focus_on_map
- focus_visible
- fullscreen
- fullscreen_on_monitor
- get_accept_focus
- get_application
- get_attached_to
- get_decorated
- get_default_icon_list
- get_default_icon_name
- get_default_size
- get_default_widget
- get_deletable
- get_destroy_with_parent
- get_focus
- get_focus_on_map
- get_focus_visible
- get_gravity
- get_group
- get_has_resize_grip
- get_hide_titlebar_when_maximized
- get_icon
- get_icon_list
- get_icon_name
- get_mnemonic_modifier
- get_mnemonics_visible
- get_modal
- get_opacity
- get_position
- get_resizable
- get_resize_grip_area
- get_role
- get_screen
- get_size
- get_skip_pager_hint
- get_skip_taskbar_hint
- get_title
- get_titlebar
- get_transient_for
- get_type_hint
- get_urgency_hint
- get_window_type
- gravity
- has_group
- has_resize_grip
- has_toplevel_focus
- hide_titlebar_when_maximized
- icon
- icon_name
- iconify
- is_active
- is_maximized
- keys_changed
- list_toplevels
- maximize
- mnemonic_activate
- mnemonics_visible
- modal
- move
- parse_geometry
- present
- present_with_time
- propagate_key_event
- remove_accel_group
- remove_mnemonic
- reshow_with_initial_size
- resizable
- resize
- resize_grip_is_visible
- resize_grip_visible
- resize_to_geometry
- role
- screen
- set_accept_focus
- set_application
- set_attached_to
- set_auto_startup_notification
- set_decorated
- set_default
- set_default_geometry
- set_default_icon
- set_default_icon_from_file
- set_default_icon_list
- set_default_icon_name
- set_default_size
- set_deletable
- set_destroy_with_parent
- set_focus
- set_focus_on_map
- set_focus_visible
- set_geometry_hints
- set_gravity
- set_has_resize_grip
- set_has_user_ref_count
- set_hide_titlebar_when_maximized
- set_icon
- set_icon_from_file
- set_icon_list
- set_icon_name
- set_interactive_debugging
- set_keep_above
- set_keep_below
- set_mnemonic_modifier
- set_mnemonics_visible
- set_modal
- set_opacity
- set_position
- set_resizable
- set_role
- set_screen
- set_skip_pager_hint
- set_skip_taskbar_hint
- set_startup_id
- set_title
- set_titlebar
- set_transient_for
- set_type_hint
- set_urgency_hint
- set_wmclass
- skip_pager_hint
- skip_taskbar_hint
- startup_id
- stick
- title
- transient_for
- try_activate_default
- try_activate_focus
- type
- type_hint
- unfullscreen
- unmaximize
- unstick
- urgency_hint
- window_position
All known members inherited from class Gtk.Bin
All known members inherited from class Gtk.Container
All known members inherited from class Gtk.Widget
- accel_closures_changed
- activate
- add_accelerator
- add_device_events
- add_events
- add_mnemonic_label
- add_tick_callback
- adjust_baseline_allocation
- adjust_baseline_request
- adjust_size_allocation
- adjust_size_request
- app_paintable
- bind_template_callback_full
- bind_template_child_full
- button_press_event
- button_release_event
- can_activate_accel
- can_default
- can_focus
- child_focus
- child_notify
- class_path
- composite_child
- composited_changed
- compute_expand
- compute_expand_internal
- configure_event
- create_pango_context
- create_pango_layout
- damage_event
- delete_event
- destroy
- destroy_event
- destroyed
- device_is_shadowed
- direction_changed
- dispatch_child_properties_changed
- double_buffered
- drag_begin
- drag_data_delete
- drag_data_get
- drag_data_received
- drag_drop
- drag_end
- drag_failed
- drag_leave
- drag_motion
- draw
- draw_to_cairo_context
- ensure_style
- enter_notify_event
- error_bell
- event
- event_after
- events
- expand
- find_style_property
- focus
- focus_in_event
- focus_on_click
- focus_out_event
- freeze_child_notify
- get_accessible
- get_action_group
- get_allocated_baseline
- get_allocated_height
- get_allocated_size
- get_allocated_width
- get_allocation
- get_ancestor
- get_app_paintable
- get_can_default
- get_can_focus
- get_child_requisition
- get_child_visible
- get_clip
- get_clipboard
- get_composite_name
- get_css_name
- get_default_direction
- get_default_style
- get_device_enabled
- get_device_events
- get_direction
- get_display
- get_double_buffered
- get_events
- get_focus_on_click
- get_font_map
- get_font_options
- get_frame_clock
- get_halign
- get_has_tooltip
- get_has_window
- get_hexpand
- get_hexpand_set
- get_mapped
- get_margin_bottom
- get_margin_end
- get_margin_left
- get_margin_right
- get_margin_start
- get_margin_top
- get_modifier_mask
- get_modifier_style
- get_no_show_all
- get_opacity
- get_pango_context
- get_parent
- get_parent_window
- get_path
- get_pointer
- get_preferred_height
- get_preferred_height_and_baseline_for_width
- get_preferred_height_for_width
- get_preferred_height_for_width_internal
- get_preferred_height_internal
- get_preferred_size
- get_preferred_width
- get_preferred_width_for_height
- get_preferred_width_for_height_internal
- get_preferred_width_internal
- get_realized
- get_receives_default
- get_request_mode
- get_requisition
- get_root_window
- get_scale_factor
- get_screen
- get_sensitive
- get_settings
- get_size_request
- get_state
- get_state_flags
- get_style
- get_style_context
- get_support_multidevice
- get_template_child
- get_tooltip_markup
- get_tooltip_text
- get_tooltip_window
- get_toplevel
- get_valign
- get_valign_with_baseline
- get_vexpand
- get_vexpand_set
- get_visible
- get_visual
- get_window
- grab_broken_event
- grab_default
- grab_focus
- grab_notify
- halign
- has_default
- has_focus
- has_grab
- has_rc_style
- has_screen
- has_tooltip
- has_visible_focus
- height_request
- hexpand
- hexpand_set
- hide
- hide_on_delete
- hierarchy_changed
- in_destruction
- init_template
- input_shape_combine_region
- insert_action_group
- install_style_property
- install_style_property_parser
- intersect
- is_ancestor
- is_composited
- is_drawable
- is_focus
- is_sensitive
- is_toplevel
- is_visible
- key_press_event
- key_release_event
- keynav_failed
- leave_notify_event
- list_accel_closures
- list_action_prefixes
- list_mnemonic_labels
- list_style_properties
- map
- map_event
- margin
- margin_bottom
- margin_end
- margin_left
- margin_right
- margin_start
- margin_top
- mnemonic_activate
- modify_base
- modify_bg
- modify_cursor
- modify_fg
- modify_font
- modify_style
- modify_text
- motion_notify_event
- move_focus
- name
- no_show_all
- opacity
- override_background_color
- override_color
- override_cursor
- override_font
- override_symbolic_color
- parent
- parent_set
- path
- pop_composite_child
- popup_menu
- property_notify_event
- proximity_in_event
- proximity_out_event
- push_composite_child
- query_tooltip
- queue_allocate
- queue_compute_expand
- queue_draw
- queue_draw_area
- queue_draw_region
- queue_resize
- queue_resize_no_redraw
- realize
- receives_default
- region_intersect
- register_window
- remove_accelerator
- remove_mnemonic_label
- remove_tick_callback
- render_icon
- render_icon_pixbuf
- reparent
- reset_rc_styles
- reset_style
- scale_factor
- screen_changed
- scroll_event
- selection_clear_event
- selection_get
- selection_notify_event
- selection_received
- selection_request_event
- send_expose
- send_focus_change
- sensitive
- set_accel_path
- set_accessible_role
- set_accessible_type
- set_allocation
- set_app_paintable
- set_can_default
- set_can_focus
- set_child_visible
- set_clip
- set_composite_name
- set_connect_func
- set_css_name
- set_default_direction
- set_device_enabled
- set_device_events
- set_direction
- set_double_buffered
- set_events
- set_focus_on_click
- set_font_map
- set_font_options
- set_halign
- set_has_tooltip
- set_has_window
- set_hexpand
- set_hexpand_set
- set_mapped
- set_margin_bottom
- set_margin_end
- set_margin_left
- set_margin_right
- set_margin_start
- set_margin_top
- set_no_show_all
- set_opacity
- set_parent
- set_parent_window
- set_realized
- set_receives_default
- set_redraw_on_allocate
- set_sensitive
- set_size_request
- set_state
- set_state_flags
- set_style
- set_support_multidevice
- set_template
- set_template_from_resource
- set_tooltip_markup
- set_tooltip_text
- set_tooltip_window
- set_valign
- set_vexpand
- set_vexpand_set
- set_visible
- set_visual
- set_window
- shape_combine_region
- show
- show_all
- show_help
- show_now
- size_allocate
- size_allocate_with_baseline
- size_request
- state_changed
- state_flags_changed
- style
- style_attach
- style_get
- style_get_property
- style_get_valist
- style_set
- style_updated
- thaw_child_notify
- tooltip_markup
- tooltip_text
- touch_event
- translate_coordinates
- trigger_tooltip_query
- unmap
- unmap_event
- unparent
- unrealize
- unregister_window
- unset_state_flags
- valign
- vexpand
- vexpand_set
- visibility_notify_event
- visible
- width_request
- window_state_event
All known members inherited from class GLib.Object
All known members inherited from interface Atk.Implementor
All known members inherited from interface Gtk.Buildable