119
111
gtk_window_set_destroy_with_parent (GTK_WINDOW (uca_editor), TRUE);
120
112
gtk_window_set_resizable (GTK_WINDOW (uca_editor), FALSE);
122
/* allocate shared tooltips object */
123
uca_editor->tooltips = gtk_tooltips_new ();
124
g_object_ref (G_OBJECT (uca_editor->tooltips));
125
gtk_object_sink (GTK_OBJECT (uca_editor->tooltips));
127
114
notebook = gtk_notebook_new ();
128
115
gtk_container_set_border_width (GTK_CONTAINER (notebook), 6);
129
116
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (uca_editor)->vbox), notebook, TRUE, TRUE, 0);
135
122
label = gtk_label_new (_("Basic"));
136
table = gtk_table_new (6, 2, FALSE);
123
table = gtk_table_new (7, 2, FALSE);
137
124
gtk_table_set_col_spacings (GTK_TABLE (table), 12);
138
125
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
139
126
gtk_container_set_border_width (GTK_CONTAINER (table), 12);
146
133
gtk_widget_show (label);
148
135
uca_editor->name_entry = g_object_new (GTK_TYPE_ENTRY, "activates-default", TRUE, NULL);
149
gtk_tooltips_set_tip (uca_editor->tooltips, uca_editor->name_entry, _("The name of the action that will be displayed in the context menu."), NULL);
136
gtk_widget_set_tooltip_text (uca_editor->name_entry, _("The name of the action that will be displayed in the context menu."));
150
137
gtk_table_attach (GTK_TABLE (table), uca_editor->name_entry, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
151
138
gtk_label_set_mnemonic_widget (GTK_LABEL (label), uca_editor->name_entry);
152
139
gtk_widget_grab_focus (uca_editor->name_entry);
164
151
gtk_widget_show (label);
166
153
uca_editor->description_entry = g_object_new (GTK_TYPE_ENTRY, "activates-default", TRUE, NULL);
167
gtk_tooltips_set_tip (uca_editor->tooltips, uca_editor->description_entry, _("The description of the action that will be displayed as tooltip "
168
"in the statusbar when selecting the item from the context menu."), NULL);
154
gtk_widget_set_tooltip_text (uca_editor->description_entry, _("The description of the action that will be displayed as tooltip "
155
"in the statusbar when selecting the item from the context menu."));
169
156
gtk_table_attach (GTK_TABLE (table), uca_editor->description_entry, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
170
157
gtk_label_set_mnemonic_widget (GTK_LABEL (label), uca_editor->description_entry);
171
158
gtk_widget_show (uca_editor->description_entry);
186
173
gtk_widget_show (hbox);
188
175
uca_editor->command_entry = g_object_new (GTK_TYPE_ENTRY, "activates-default", TRUE, NULL);
189
gtk_tooltips_set_tip (uca_editor->tooltips, uca_editor->command_entry, _("The command (including the necessary parameters) to perform the action. "
190
"See the command parameter legend below for a list of supported parameter "
191
"variables, which will be substituted when launching the command. When "
192
"upper-case letters (e.g. %F, %D, %N) are used, the action will be applicable "
193
"even if more than one item is selected. Else the action will only be "
194
"applicable if exactly one item is selected."), NULL);
176
gtk_widget_set_tooltip_text (uca_editor->command_entry, _("The command (including the necessary parameters) to perform the action. "
177
"See the command parameter legend below for a list of supported parameter "
178
"variables, which will be substituted when launching the command. When "
179
"upper-case letters (e.g. %F, %D, %N) are used, the action will be applicable "
180
"even if more than one item is selected. Else the action will only be "
181
"applicable if exactly one item is selected."));
195
182
gtk_box_pack_start (GTK_BOX (hbox), uca_editor->command_entry, TRUE, TRUE, 0);
196
183
gtk_label_set_mnemonic_widget (GTK_LABEL (label), uca_editor->command_entry);
197
184
gtk_widget_show (uca_editor->command_entry);
199
186
button = gtk_button_new ();
200
gtk_tooltips_set_tip (uca_editor->tooltips, button, _("Browse the file system to select an application to use for this action."), NULL);
187
gtk_widget_set_tooltip_text (button, _("Browse the file system to select an application to use for this action."));
201
188
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
202
189
g_signal_connect_swapped (G_OBJECT (button), "clicked", G_CALLBACK (thunar_uca_editor_command_clicked), uca_editor);
203
190
gtk_widget_show (button);
213
200
atk_relation_set_add (relations, relation);
214
201
g_object_unref (G_OBJECT (relation));
203
uca_editor->sn_button = gtk_check_button_new_with_label (_("Use Startup Notification"));
204
gtk_widget_set_tooltip_text (uca_editor->sn_button, _("Enable this option if you want a waiting cursor to be shown while the "
205
"action is launched. This is also highly recommended if you have focus "
206
"stealing prevention enabled in your window manager."));
207
gtk_table_attach (GTK_TABLE (table), uca_editor->sn_button, 1, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
208
gtk_widget_show (uca_editor->sn_button);
216
210
label = g_object_new (GTK_TYPE_LABEL, "label", _("_Icon:"), "use-underline", TRUE, "xalign", 0.0f, NULL);
217
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4, GTK_FILL, GTK_FILL, 0, 0);
211
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 4, 5, GTK_FILL, GTK_FILL, 0, 0);
218
212
gtk_widget_show (label);
220
214
align = gtk_alignment_new (0.0f, 0.5f, 0.0f, 0.0f);
221
gtk_table_attach (GTK_TABLE (table), align, 1, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
215
gtk_table_attach (GTK_TABLE (table), align, 1, 2, 4, 5, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
222
216
gtk_widget_show (align);
224
218
uca_editor->icon_button = gtk_button_new_with_label (_("No icon"));
225
gtk_tooltips_set_tip (uca_editor->tooltips, uca_editor->icon_button, _("Click this button to select an icon file that will be displayed "
226
"in the context menu in addition to the action name chosen above."), NULL);
219
gtk_widget_set_tooltip_text (uca_editor->icon_button, _("Click this button to select an icon file that will be displayed "
220
"in the context menu in addition to the action name chosen above."));
227
221
gtk_container_add (GTK_CONTAINER (align), uca_editor->icon_button);
228
222
g_signal_connect_swapped (G_OBJECT (uca_editor->icon_button), "clicked", G_CALLBACK (thunar_uca_editor_icon_clicked), uca_editor);
229
223
gtk_label_set_mnemonic_widget (GTK_LABEL (label), uca_editor->icon_button);
237
231
g_object_unref (G_OBJECT (relation));
239
233
align = g_object_new (GTK_TYPE_ALIGNMENT, "height-request", 12, NULL);
240
gtk_table_attach (GTK_TABLE (table), align, 0, 2, 4, 5, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
234
gtk_table_attach (GTK_TABLE (table), align, 0, 2, 5, 6, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
241
235
gtk_widget_show (align);
243
237
hbox = gtk_hbox_new (FALSE, 6);
244
gtk_table_attach (GTK_TABLE (table), hbox, 0, 2, 5, 6, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
238
gtk_table_attach (GTK_TABLE (table), hbox, 0, 2, 6, 7, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
245
239
gtk_widget_show (hbox);
247
241
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DND);
378
372
gtk_widget_show (label);
380
374
uca_editor->patterns_entry = g_object_new (GTK_TYPE_ENTRY, "activates-default", TRUE, "text", "*", NULL);
381
gtk_tooltips_set_tip (uca_editor->tooltips, uca_editor->patterns_entry, _("Enter a list of patterns that will be used to determine "
382
"whether this action should be displayed for a selected "
383
"file. If you specify more than one pattern here, the list "
384
"items must be separated with semicolons (e.g. *.txt;*.doc)."), NULL);
375
gtk_widget_set_tooltip_text (uca_editor->patterns_entry, _("Enter a list of patterns that will be used to determine "
376
"whether this action should be displayed for a selected "
377
"file. If you specify more than one pattern here, the list "
378
"items must be separated with semicolons (e.g. *.txt;*.doc)."));
385
379
gtk_table_attach (GTK_TABLE (table), uca_editor->patterns_entry, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
386
380
gtk_label_set_mnemonic_widget (GTK_LABEL (label), uca_editor->patterns_entry);
387
381
gtk_widget_show (uca_editor->patterns_entry);
803
785
THUNAR_UCA_MODEL_COLUMN_TYPES, &types,
804
786
THUNAR_UCA_MODEL_COLUMN_ICON, &icon,
805
787
THUNAR_UCA_MODEL_COLUMN_NAME, &name,
788
THUNAR_UCA_MODEL_COLUMN_STARTUP_NOTIFY, &startup_notify,
808
791
/* setup the new selection */
850
834
gtk_entry_get_text (GTK_ENTRY (uca_editor->description_entry)),
851
835
thunar_uca_editor_get_icon_name (uca_editor),
852
836
gtk_entry_get_text (GTK_ENTRY (uca_editor->command_entry)),
837
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (uca_editor->sn_button)),
853
838
gtk_entry_get_text (GTK_ENTRY (uca_editor->patterns_entry)),
854
839
thunar_uca_editor_get_types (uca_editor));