annotate gui/mplayer/gtk/gtk_url.c @ 33389:2672587086ad

Add MNG output support. Patch by Stefan Schuermans, stefan blinkenarea dot org.
author cboesch
date Sat, 21 May 2011 15:04:50 +0000
parents 32725ca88fed
children c5a19bbeac2b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26458
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
1 /*
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
2 * This file is part of MPlayer.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
3 *
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
4 * MPlayer is free software; you can redistribute it and/or modify
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
5 * it under the terms of the GNU General Public License as published by
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
7 * (at your option) any later version.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
8 *
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
9 * MPlayer is distributed in the hope that it will be useful,
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
12 * GNU General Public License for more details.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
13 *
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
14 * You should have received a copy of the GNU General Public License along
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
17 */
26137
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
18
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
19 #include <sys/types.h>
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
20 #include <sys/stat.h>
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
21 #include <unistd.h>
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
22 #include <stdlib.h>
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
23 #include <stdio.h>
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
24 #include <string.h>
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
25
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
26 #include <gdk/gdkkeysyms.h>
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
27 #include <gtk/gtk.h>
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
28
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
29 #include "gtk_url.h"
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
30 #include "gtk_common.h"
26365
10dfbc523184 Add gui/ prefix to some #include paths so that compilation from the
diego
parents: 26137
diff changeset
31 #include "gui/interface.h"
10dfbc523184 Add gui/ prefix to some #include paths so that compilation from the
diego
parents: 26137
diff changeset
32 #include "gui/app.h"
26382
b2f4abcf20ed Make include paths consistent; do not use ../ in them.
diego
parents: 26365
diff changeset
33 #include "gui/mplayer/gmplayer.h"
b2f4abcf20ed Make include paths consistent; do not use ../ in them.
diego
parents: 26365
diff changeset
34 #include "gui/mplayer/widgets.h"
26137
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
35 #include "help_mp.h"
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
36
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
37 GtkWidget * URL = NULL;
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
38
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
39 static GtkWidget * URLCombo;
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
40 static GtkWidget * URLEntry;
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
41 static GList * URLComboEntrys = NULL;
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
42
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
43 void ShowURLDialogBox( void )
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
44 {
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
45 if ( URL ) gtkActive( URL );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
46 else URL=create_URL();
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 26458
diff changeset
47
26137
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
48 if ( URLList )
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
49 {
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
50 URLItem * item = URLList;
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
51 g_list_free( URLComboEntrys );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
52 URLComboEntrys=NULL;
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
53 while( item )
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
54 {
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
55 URLComboEntrys=g_list_append( URLComboEntrys,(gchar *)item->url );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
56 item=item->next;
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
57 }
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
58 }
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 26458
diff changeset
59
26137
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
60 if ( URLComboEntrys )
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
61 {
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
62 gtk_entry_set_text( GTK_ENTRY( URLEntry ),URLComboEntrys->data );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
63 gtk_combo_set_popdown_strings( GTK_COMBO( URLCombo ),URLComboEntrys );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
64 }
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 26458
diff changeset
65
26137
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
66 gtk_widget_show( URL );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
67 }
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
68
30535
016e5fc1dead GUI: Mark functions that are not used outside their files as static.
diego
parents: 29263
diff changeset
69 static void HideURLDialogBox( void )
26137
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
70 {
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
71 if ( !URL ) return;
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
72 gtk_widget_hide( URL );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
73 gtk_widget_destroy( URL );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
74 URL=0;
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
75 }
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
76
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
77 static void on_Button_pressed( GtkButton * button,gpointer user_data )
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 26458
diff changeset
78 {
26137
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
79 URLItem * item;
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
80
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
81 if ( (int)user_data )
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
82 {
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
83 gchar * str= strdup( gtk_entry_get_text( GTK_ENTRY( URLEntry ) ) );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
84
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
85 if ( str )
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
86 {
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
87 if ( strncmp( str,"http://",7 )
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
88 && strncmp( str,"ftp://",6 )
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
89 && strncmp( str,"mms://",6 )
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
90 && strncmp( str,"pnm://",6 )
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
91 && strncmp( str,"rtsp://",7 ) )
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
92 {
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
93 gchar * tmp;
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
94 tmp=malloc( strlen( str ) + 8 );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
95 sprintf( tmp,"http://%s",str );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
96 free( str ); str=tmp;
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
97 }
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
98 URLComboEntrys=g_list_prepend( URLComboEntrys,(gchar *)str );
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 26458
diff changeset
99
26137
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
100 item=calloc( 1,sizeof( URLItem ) );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
101 item->url=gstrdup( str );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
102 gtkSet( gtkAddURLItem,0,(void *)item );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
103
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
104 guiSetFilename( guiIntfStruct.Filename,str ); guiIntfStruct.FilenameChanged=1;
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
105 mplEventHandling( evPlayNetwork,0 );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
106 }
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
107 }
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 26458
diff changeset
108 HideURLDialogBox();
26137
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
109 }
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
110
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
111 GtkWidget * create_URL( void )
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
112 {
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
113 GtkWidget * vbox1;
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
114 GtkWidget * hbox1;
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
115 GtkWidget * hbuttonbox1;
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
116 GtkWidget * Ok;
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
117 GtkWidget * Cancel;
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
118 GtkAccelGroup * accel_group;
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
119
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
120 accel_group=gtk_accel_group_new();
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
121
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
122 URL=gtk_window_new( GTK_WINDOW_TOPLEVEL );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
123 gtk_widget_set_name( URL,"URL" );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
124 gtk_object_set_data( GTK_OBJECT( URL ),"URL",URL );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
125 gtk_widget_set_usize( URL,384,70 );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
126 GTK_WIDGET_SET_FLAGS( URL,GTK_CAN_DEFAULT );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
127 gtk_window_set_title( GTK_WINDOW( URL ),MSGTR_Network );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
128 gtk_window_set_position( GTK_WINDOW( URL ),GTK_WIN_POS_CENTER );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
129 gtk_window_set_policy( GTK_WINDOW( URL ),TRUE,TRUE,FALSE );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
130 gtk_window_set_wmclass( GTK_WINDOW( URL ),"Network","MPlayer" );
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 26458
diff changeset
131
26137
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
132 gtk_widget_realize( URL );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
133 gtkAddIcon( URL );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
134
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
135 vbox1=AddVBox( AddDialogFrame( URL ),0 );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
136 hbox1=AddHBox( vbox1,1 );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
137 AddLabel( "URL: ",hbox1 );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
138
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
139 URLCombo=AddComboBox( hbox1 );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
140 /*
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
141 gtk_combo_new();
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
142 gtk_widget_set_name( URLCombo,"URLCombo" );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
143 gtk_widget_show( URLCombo );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
144 gtk_box_pack_start( GTK_BOX( hbox1 ),URLCombo,TRUE,TRUE,0 );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
145 */
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
146 URLEntry=GTK_COMBO( URLCombo )->entry;
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
147 gtk_widget_set_name( URLEntry,"URLEntry" );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
148 gtk_widget_show( URLEntry );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
149
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
150 AddHSeparator( vbox1 );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
151
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
152 hbuttonbox1=AddHButtonBox( vbox1 );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
153 gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox1 ),GTK_BUTTONBOX_END );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
154 gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox1 ),10 );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
155
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
156 Ok=AddButton( MSGTR_Ok,hbuttonbox1 );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
157 Cancel=AddButton( MSGTR_Cancel,hbuttonbox1 );
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 26458
diff changeset
158
26137
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
159 gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
160 gtk_widget_add_accelerator( Cancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
161
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
162 gtk_signal_connect( GTK_OBJECT( URL ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&URL );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
163 gtk_signal_connect( GTK_OBJECT( Ok ),"clicked",GTK_SIGNAL_FUNC( on_Button_pressed ),(void *)1 );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
164 gtk_signal_connect( GTK_OBJECT( Cancel ),"clicked",GTK_SIGNAL_FUNC( on_Button_pressed ),NULL );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
165
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
166 gtk_widget_grab_focus( URLEntry );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
167 gtk_window_add_accel_group( GTK_WINDOW( URL ),accel_group );
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
168
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
169 return URL;
02a08fffb1dc Rename url.c/url.h to the less generic gtk_url.c/gtk_url.h.
diego
parents:
diff changeset
170 }