[MPlayer-cvslog] r38528 - trunk/gui/dialog/url.c
ib
subversion at mplayerhq.hu
Thu May 16 23:16:22 EEST 2024
Author: ib
Date: Thu May 16 23:16:22 2024
New Revision: 38528
Log:
Put all statements related to accel_group in one place.
Modified:
trunk/gui/dialog/url.c
Modified: trunk/gui/dialog/url.c
==============================================================================
--- trunk/gui/dialog/url.c Thu May 16 23:14:58 2024 (r38527)
+++ trunk/gui/dialog/url.c Thu May 16 23:16:22 2024 (r38528)
@@ -107,8 +107,6 @@ static GtkWidget *CreateURLDialog(void)
GtkWidget *Cancel;
GtkAccelGroup *accel_group;
- accel_group = gtk_accel_group_new();
-
URLDialog = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_set_size_request(URLDialog, 384, -1);
gtk_window_set_title(GTK_WINDOW(URLDialog), _(MSGTR_GUI_NetworkStreaming));
@@ -139,16 +137,19 @@ static GtkWidget *CreateURLDialog(void)
gtk_widget_set_sensitive(Ok, FALSE);
+ accel_group = gtk_accel_group_new();
+
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);
+ gtk_window_add_accel_group(GTK_WINDOW(URLDialog), accel_group);
+
g_signal_connect(G_OBJECT(URLDialog), "destroy", G_CALLBACK(gtk_widget_destroyed), &URLDialog);
g_signal_connect(G_OBJECT(urlCombo), "changed", G_CALLBACK(entry_changed), Ok);
g_signal_connect(G_OBJECT(Ok), "clicked", G_CALLBACK(button_clicked), Ok);
g_signal_connect(G_OBJECT(Cancel), "clicked", G_CALLBACK(button_clicked), NULL);
gtk_widget_grab_focus(urlCombo);
- gtk_window_add_accel_group(GTK_WINDOW(URLDialog), accel_group);
return URLDialog;
}
More information about the MPlayer-cvslog
mailing list