Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ángel
evolution
Commits
3c6cc7e1
Commit
3c6cc7e1
authored
Feb 15, 2011
by
Milan Crha
Committed by
Rodrigo Moya
Jun 29, 2011
Browse files
Slightly nicer EAlertDialog after move to gtk3
parent
0d27f00d
Changes
2
Hide whitespace changes
Inline
Side-by-side
e-util/e-alert-dialog.c
View file @
3c6cc7e1
...
...
@@ -120,6 +120,10 @@ alert_dialog_constructed (GObject *object)
PangoAttrList
*
list
;
GList
*
actions
;
const
gchar
*
primary
,
*
secondary
;
gint
min_width
=
-
1
,
prefer_width
=
-
1
;
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS
(
e_alert_dialog_parent_class
)
->
constructed
(
object
);
dialog
=
E_ALERT_DIALOG
(
object
);
alert
=
e_alert_dialog_get_alert
(
dialog
);
...
...
@@ -159,7 +163,7 @@ alert_dialog_constructed (GObject *object)
gtk_box_pack_end
(
GTK_BOX
(
action_area
),
button
,
FALSE
,
TRU
E
,
0
);
button
,
FALSE
,
FALS
E
,
0
);
actions
=
g_list_next
(
actions
);
}
...
...
@@ -171,7 +175,7 @@ alert_dialog_constructed (GObject *object)
widget
=
gtk_hbox_new
(
FALSE
,
12
);
gtk_container_set_border_width
(
GTK_CONTAINER
(
widget
),
12
);
gtk_box_pack_start
(
GTK_BOX
(
content_area
),
widget
,
TRUE
,
TRU
E
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
content_area
),
widget
,
FALSE
,
FALS
E
,
0
);
gtk_widget_show
(
widget
);
container
=
widget
;
...
...
@@ -213,10 +217,13 @@ alert_dialog_constructed (GObject *object)
gtk_widget_set_can_focus
(
widget
,
FALSE
);
gtk_widget_show
(
widget
);
pango_attr_list_unref
(
list
);
widget
=
GTK_WIDGET
(
dialog
);
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS
(
e_alert_dialog_parent_class
)
->
constructed
(
object
);
gtk_widget_get_preferred_width_for_height
(
widget
,
gtk_widget_get_allocated_height
(
widget
),
&
min_width
,
&
prefer_width
);
if
(
min_width
<
prefer_width
)
gtk_window_set_default_size
(
GTK_WINDOW
(
dialog
),
MIN
((
min_width
+
prefer_width
)
/
2
,
min_width
*
5
/
4
),
-
1
);
pango_attr_list_unref
(
list
);
}
static
void
...
...
mail/em-utils.c
View file @
3c6cc7e1
...
...
@@ -151,9 +151,8 @@ em_utils_prompt_user (GtkWindow *parent,
if
(
promptkey
)
{
check
=
gtk_check_button_new_with_mnemonic
(
_
(
"_Do not show this message again"
));
gtk_container_set_border_width
((
GtkContainer
*
)
check
,
12
);
container
=
gtk_dialog_get_content_area
(
GTK_DIALOG
(
mbox
));
gtk_box_pack_start
(
GTK_BOX
(
container
),
check
,
TRUE
,
TRU
E
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
container
),
check
,
FALSE
,
FALS
E
,
0
);
gtk_widget_show
(
check
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment