-
-
-/* This turns auto-shrink off if the user resizes the width of the dialog.
- It also turns it back on again if the user resizes it back to its normal
- width. */
-static gint
-gtk_font_selection_dialog_on_configure (GtkWidget *widget,
- GdkEventConfigure *event,
- GtkFontSelectionDialog *fsd)
-{
- /* This sets the initial width. */
- if (fsd->dialog_width == -1)
- fsd->dialog_width = event->width;
- else if (fsd->auto_resize && fsd->dialog_width != event->width)
- {
- fsd->auto_resize = FALSE;
- gtk_window_set_policy (GTK_WINDOW (fsd), FALSE, TRUE, FALSE);
- }
- else if (!fsd->auto_resize && fsd->dialog_width == event->width)
- {
- fsd->auto_resize = TRUE;
- gtk_window_set_policy (GTK_WINDOW (fsd), FALSE, TRUE, TRUE);
- }
-
- return FALSE;
-}