[Fix #28495 with a lame hack that works around Bonobo sizing
brokenness] (set_dialog_size): New. (impl_realize): Override for GtkWidget::realize; invoke set_dialog_size() to set a minimum size. (class_init): Install. svn path=/trunk/; revision=18126
This commit is contained in:
@ -1,3 +1,13 @@
|
||||
2002-09-19 Ettore Perazzoli <ettore@ximian.com>
|
||||
|
||||
[Fix #28495 with a lame hack that works around Bonobo sizing
|
||||
brokenness]
|
||||
|
||||
* e-shell-settings-dialog.c (set_dialog_size): New.
|
||||
(impl_realize): Override for GtkWidget::realize; invoke
|
||||
set_dialog_size() to set a minimum size.
|
||||
(class_init): Install.
|
||||
|
||||
2002-09-19 Ettore Perazzoli <ettore@ximian.com>
|
||||
|
||||
* e-shell-folder-creation-dialog.c (async_create_cb): Don't set
|
||||
@ -4698,7 +4708,7 @@
|
||||
(e_shell_folder_title_bar_construct): Make the name of the folder
|
||||
bold using it.
|
||||
|
||||
o2001-08-16 Ettore Perazzoli <ettore@ximian.com>
|
||||
2001-08-16 Ettore Perazzoli <ettore@ximian.com>
|
||||
|
||||
* e-gray-bar.c (endarken_style): Just hardcode the colors.
|
||||
|
||||
|
||||
@ -49,6 +49,23 @@ struct _EShellSettingsDialogPrivate {
|
||||
GHashTable *types;
|
||||
};
|
||||
|
||||
|
||||
/* FIXME ugly hack to work around that sizing of invisible widgets is broken
|
||||
with Bonobo. */
|
||||
|
||||
static void
|
||||
set_dialog_size (EShellSettingsDialog *dialog)
|
||||
{
|
||||
GdkFont *font;
|
||||
int width, height;
|
||||
|
||||
font = GTK_WIDGET (dialog)->style->font;
|
||||
width = gdk_string_width (font, "M") * 66;
|
||||
height = (font->ascent + font->descent) * 35;
|
||||
|
||||
gtk_widget_set_usize (GTK_WIDGET (dialog), width, height);
|
||||
}
|
||||
|
||||
|
||||
/* Page handling. */
|
||||
|
||||
@ -235,6 +252,21 @@ load_pages (EShellSettingsDialog *dialog)
|
||||
CORBA_exception_free (&ev);
|
||||
}
|
||||
|
||||
|
||||
/* GtkWidget methods. */
|
||||
|
||||
static void
|
||||
impl_realize (GtkWidget *widget)
|
||||
{
|
||||
EShellSettingsDialog *dialog;
|
||||
|
||||
dialog = E_SHELL_SETTINGS_DIALOG (widget);
|
||||
|
||||
set_dialog_size (dialog);
|
||||
|
||||
(* GTK_WIDGET_CLASS (parent_class)->realize) (widget);
|
||||
}
|
||||
|
||||
|
||||
/* GtkObject methods. */
|
||||
|
||||
@ -268,10 +300,14 @@ static void
|
||||
class_init (EShellSettingsDialog *class)
|
||||
{
|
||||
GtkObjectClass *object_class;
|
||||
GtkWidgetClass *widget_class;
|
||||
|
||||
object_class = GTK_OBJECT_CLASS (class);
|
||||
object_class->destroy = impl_destroy;
|
||||
|
||||
widget_class = GTK_WIDGET_CLASS (class);
|
||||
widget_class->realize = impl_realize;
|
||||
|
||||
parent_class = gtk_type_class (PARENT_TYPE);
|
||||
}
|
||||
|
||||
@ -288,7 +324,6 @@ init (EShellSettingsDialog *dialog)
|
||||
load_pages (dialog);
|
||||
|
||||
gtk_window_set_title (GTK_WINDOW (dialog), _("Evolution Settings"));
|
||||
gtk_window_set_default_size (GTK_WINDOW (dialog), 600, 450);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user