[MPlayer-cvslog] r38527 - trunk/gui/dialog/url.c

ib subversion at mplayerhq.hu
Thu May 16 23:14:58 EEST 2024


Author: ib
Date: Thu May 16 23:14:58 2024
New Revision: 38527

Log:
Move the window geometry statements further up.

This puts all window-related statements in one place.

Modified:
   trunk/gui/dialog/url.c

Modified: trunk/gui/dialog/url.c
==============================================================================
--- trunk/gui/dialog/url.c	Thu May 16 23:13:21 2024	(r38526)
+++ trunk/gui/dialog/url.c	Thu May 16 23:14:58 2024	(r38527)
@@ -99,13 +99,13 @@ static void button_clicked(GtkButton *bu
 
 static GtkWidget *CreateURLDialog(void)
 {
+    GdkGeometry geometry;
     GtkWidget *vbox;
     GtkWidget *hbox;
     GtkWidget *hbuttonbox;
     GtkWidget *Ok;
     GtkWidget *Cancel;
     GtkAccelGroup *accel_group;
-    GdkGeometry geometry;
 
     accel_group = gtk_accel_group_new();
 
@@ -115,6 +115,10 @@ static GtkWidget *CreateURLDialog(void)
     gtk_window_set_position(GTK_WINDOW(URLDialog), GTK_WIN_POS_CENTER);
     gtk_window_set_wmclass(GTK_WINDOW(URLDialog), "Network", MPlayer);
 
+    geometry.max_width  = gdk_screen_get_width(gtk_widget_get_screen(URLDialog));
+    geometry.max_height = -1;
+    gtk_window_set_geometry_hints(GTK_WINDOW(URLDialog), NULL, &geometry, GDK_HINT_MAX_SIZE);
+
     gtk_widget_realize(URLDialog);
     gtkAddIcon(URLDialog);
 
@@ -135,10 +139,6 @@ static GtkWidget *CreateURLDialog(void)
 
     gtk_widget_set_sensitive(Ok, FALSE);
 
-    geometry.max_width  = gdk_screen_get_width(gtk_widget_get_screen(URLDialog));
-    geometry.max_height = -1;
-    gtk_window_set_geometry_hints(GTK_WINDOW(URLDialog), NULL, &geometry, GDK_HINT_MAX_SIZE);
-
     gtk_widget_add_accelerator(Ok, "clicked", accel_group, GDK_KEY_Return, 0, GTK_ACCEL_VISIBLE);
     gtk_widget_add_accelerator(Cancel, "clicked", accel_group, GDK_KEY_Escape, 0, GTK_ACCEL_VISIBLE);
 


More information about the MPlayer-cvslog mailing list