Mercurial > geeqie.yaz
comparison src/utilops.c @ 1174:0bea79d87065
Drop useless wmclass stuff. Gtk will take care of it and as said in the documentation using gtk_window_set_wmclass() is sort of pointless.
author | zas_ |
---|---|
date | Sun, 23 Nov 2008 16:10:29 +0000 |
parents | 1646720364cf |
children | 2518a4a73d89 |
comparison
equal
deleted
inserted
replaced
1173:52ce0263cb7c | 1174:0bea79d87065 |
---|---|
150 * Wrappers to aid in setting additional dialog properties (unde mouse, etc.) | 150 * Wrappers to aid in setting additional dialog properties (unde mouse, etc.) |
151 *-------------------------------------------------------------------------- | 151 *-------------------------------------------------------------------------- |
152 */ | 152 */ |
153 | 153 |
154 GenericDialog *file_util_gen_dlg(const gchar *title, | 154 GenericDialog *file_util_gen_dlg(const gchar *title, |
155 const gchar *wmclass, const gchar *wmsubclass, | 155 const gchar *wmsubclass, |
156 GtkWidget *parent, gint auto_close, | 156 GtkWidget *parent, gint auto_close, |
157 void (*cancel_cb)(GenericDialog *, gpointer), gpointer data) | 157 void (*cancel_cb)(GenericDialog *, gpointer), gpointer data) |
158 { | 158 { |
159 GenericDialog *gd; | 159 GenericDialog *gd; |
160 | 160 |
161 gd = generic_dialog_new(title, wmclass, wmsubclass, parent, auto_close, cancel_cb, data); | 161 gd = generic_dialog_new(title, wmsubclass, parent, auto_close, cancel_cb, data); |
162 if (options->place_dialogs_under_mouse) | 162 if (options->place_dialogs_under_mouse) |
163 { | 163 { |
164 gtk_window_set_position(GTK_WINDOW(gd->dialog), GTK_WIN_POS_MOUSE); | 164 gtk_window_set_position(GTK_WINDOW(gd->dialog), GTK_WIN_POS_MOUSE); |
165 } | 165 } |
166 | 166 |
167 return gd; | 167 return gd; |
168 } | 168 } |
169 | 169 |
170 FileDialog *file_util_file_dlg(const gchar *title, | 170 FileDialog *file_util_file_dlg(const gchar *title, |
171 const gchar *wmclass, const gchar *wmsubclass, | 171 const gchar *wmsubclass, |
172 GtkWidget *parent, | 172 GtkWidget *parent, |
173 void (*cancel_cb)(FileDialog *, gpointer), gpointer data) | 173 void (*cancel_cb)(FileDialog *, gpointer), gpointer data) |
174 { | 174 { |
175 FileDialog *fdlg; | 175 FileDialog *fdlg; |
176 | 176 |
177 fdlg = file_dialog_new(title, wmclass, wmsubclass, parent, cancel_cb, data); | 177 fdlg = file_dialog_new(title, wmsubclass, parent, cancel_cb, data); |
178 if (options->place_dialogs_under_mouse) | 178 if (options->place_dialogs_under_mouse) |
179 { | 179 { |
180 gtk_window_set_position(GTK_WINDOW(GENERIC_DIALOG(fdlg)->dialog), GTK_WIN_POS_MOUSE); | 180 gtk_window_set_position(GTK_WINDOW(GENERIC_DIALOG(fdlg)->dialog), GTK_WIN_POS_MOUSE); |
181 } | 181 } |
182 | 182 |
195 GenericDialog *file_util_warning_dialog(const gchar *heading, const gchar *message, | 195 GenericDialog *file_util_warning_dialog(const gchar *heading, const gchar *message, |
196 const gchar *icon_stock_id, GtkWidget *parent) | 196 const gchar *icon_stock_id, GtkWidget *parent) |
197 { | 197 { |
198 GenericDialog *gd; | 198 GenericDialog *gd; |
199 | 199 |
200 gd = file_util_gen_dlg(heading, GQ_WMCLASS, "warning", parent, TRUE, NULL, NULL); | 200 gd = file_util_gen_dlg(heading, "warning", parent, TRUE, NULL, NULL); |
201 generic_dialog_add_message(gd, icon_stock_id, heading, message); | 201 generic_dialog_add_message(gd, icon_stock_id, heading, message); |
202 generic_dialog_add_button(gd, GTK_STOCK_OK, NULL, file_util_warning_dialog_ok_cb, TRUE); | 202 generic_dialog_add_button(gd, GTK_STOCK_OK, NULL, file_util_warning_dialog_ok_cb, TRUE); |
203 if (options->place_dialogs_under_mouse) | 203 if (options->place_dialogs_under_mouse) |
204 { | 204 { |
205 gtk_window_set_position(GTK_WINDOW(gd->dialog), GTK_WIN_POS_MOUSE); | 205 gtk_window_set_position(GTK_WINDOW(gd->dialog), GTK_WIN_POS_MOUSE); |
509 list = list->next; | 509 list = list->next; |
510 } | 510 } |
511 if (resume_data) | 511 if (resume_data) |
512 { | 512 { |
513 g_string_append(msg, _("\n Continue multiple file operation?")); | 513 g_string_append(msg, _("\n Continue multiple file operation?")); |
514 d = file_util_gen_dlg(ud->messages.fail, GQ_WMCLASS, "dlg_confirm", | 514 d = file_util_gen_dlg(ud->messages.fail, "dlg_confirm", |
515 NULL, TRUE, | 515 NULL, TRUE, |
516 file_util_abort_cb, ud); | 516 file_util_abort_cb, ud); |
517 | 517 |
518 generic_dialog_add_message(d, GTK_STOCK_DIALOG_WARNING, NULL, msg->str); | 518 generic_dialog_add_message(d, GTK_STOCK_DIALOG_WARNING, NULL, msg->str); |
519 | 519 |
898 if (!(error & CHANGE_ERROR_MASK)) | 898 if (!(error & CHANGE_ERROR_MASK)) |
899 { | 899 { |
900 /* just a warning */ | 900 /* just a warning */ |
901 GenericDialog *d; | 901 GenericDialog *d; |
902 | 902 |
903 d = file_util_gen_dlg(ud->messages.title, GQ_WMCLASS, "dlg_confirm", | 903 d = file_util_gen_dlg(ud->messages.title, "dlg_confirm", |
904 ud->parent, TRUE, | 904 ud->parent, TRUE, |
905 file_util_check_abort_cb, ud); | 905 file_util_check_abort_cb, ud); |
906 | 906 |
907 generic_dialog_add_message(d, GTK_STOCK_DIALOG_WARNING, _("Really continue?"), desc); | 907 generic_dialog_add_message(d, GTK_STOCK_DIALOG_WARNING, _("Really continue?"), desc); |
908 | 908 |
913 else | 913 else |
914 { | 914 { |
915 /* fatal error */ | 915 /* fatal error */ |
916 GenericDialog *d; | 916 GenericDialog *d; |
917 | 917 |
918 d = file_util_gen_dlg(ud->messages.title, GQ_WMCLASS, "dlg_confirm", | 918 d = file_util_gen_dlg(ud->messages.title, "dlg_confirm", |
919 ud->parent, TRUE, | 919 ud->parent, TRUE, |
920 file_util_check_abort_cb, ud); | 920 file_util_check_abort_cb, ud); |
921 generic_dialog_add_message(d, GTK_STOCK_DIALOG_WARNING, _("This operation can't continue:"), desc); | 921 generic_dialog_add_message(d, GTK_STOCK_DIALOG_WARNING, _("This operation can't continue:"), desc); |
922 | 922 |
923 gtk_widget_show(d->dialog); | 923 gtk_widget_show(d->dialog); |
1239 { | 1239 { |
1240 GtkWidget *box; | 1240 GtkWidget *box; |
1241 GtkTreeSelection *selection; | 1241 GtkTreeSelection *selection; |
1242 gchar *dir_msg; | 1242 gchar *dir_msg; |
1243 | 1243 |
1244 ud->gd = file_util_gen_dlg(ud->messages.title, GQ_WMCLASS, "dlg_confirm", | 1244 ud->gd = file_util_gen_dlg(ud->messages.title, "dlg_confirm", |
1245 ud->parent, FALSE, file_util_cancel_cb, ud); | 1245 ud->parent, FALSE, file_util_cancel_cb, ud); |
1246 generic_dialog_add_button(ud->gd, GTK_STOCK_DELETE, NULL, file_util_ok_cb, TRUE); | 1246 generic_dialog_add_button(ud->gd, GTK_STOCK_DELETE, NULL, file_util_ok_cb, TRUE); |
1247 | 1247 |
1248 | 1248 |
1249 if (ud->dir_fd) | 1249 if (ud->dir_fd) |
1292 else | 1292 else |
1293 { | 1293 { |
1294 stock_id = GTK_STOCK_OK; | 1294 stock_id = GTK_STOCK_OK; |
1295 } | 1295 } |
1296 | 1296 |
1297 fdlg = file_util_file_dlg(ud->messages.title, GQ_WMCLASS, "dlg_dest_folder", ud->parent, | 1297 fdlg = file_util_file_dlg(ud->messages.title, "dlg_dest_folder", ud->parent, |
1298 file_util_fdlg_cancel_cb, ud); | 1298 file_util_fdlg_cancel_cb, ud); |
1299 | 1299 |
1300 ud->fdlg = fdlg; | 1300 ud->fdlg = fdlg; |
1301 | 1301 |
1302 generic_dialog_add_message(GENERIC_DIALOG(fdlg), NULL, ud->messages.question, NULL); | 1302 generic_dialog_add_message(GENERIC_DIALOG(fdlg), NULL, ud->messages.question, NULL); |
1342 GtkWidget *box2; | 1342 GtkWidget *box2; |
1343 GtkWidget *table; | 1343 GtkWidget *table; |
1344 GtkWidget *combo; | 1344 GtkWidget *combo; |
1345 GtkWidget *page; | 1345 GtkWidget *page; |
1346 | 1346 |
1347 ud->gd = file_util_gen_dlg(ud->messages.title, GQ_WMCLASS, "dlg_confirm", | 1347 ud->gd = file_util_gen_dlg(ud->messages.title, "dlg_confirm", |
1348 ud->parent, FALSE, file_util_cancel_cb, ud); | 1348 ud->parent, FALSE, file_util_cancel_cb, ud); |
1349 | 1349 |
1350 box = generic_dialog_add_message(ud->gd, NULL, ud->messages.question, NULL); | 1350 box = generic_dialog_add_message(ud->gd, NULL, ud->messages.question, NULL); |
1351 generic_dialog_add_button(ud->gd, GTK_STOCK_OK, ud->messages.title, file_util_ok_cb, TRUE); | 1351 generic_dialog_add_button(ud->gd, GTK_STOCK_OK, ud->messages.title, file_util_ok_cb, TRUE); |
1352 | 1352 |
1935 { | 1935 { |
1936 GenericDialog *gd; | 1936 GenericDialog *gd; |
1937 GtkWidget *box; | 1937 GtkWidget *box; |
1938 gchar *text; | 1938 gchar *text; |
1939 | 1939 |
1940 gd = file_util_gen_dlg(_("Folder contains subfolders"), GQ_WMCLASS, "dlg_warning", | 1940 gd = file_util_gen_dlg(_("Folder contains subfolders"), "dlg_warning", |
1941 parent, TRUE, NULL, NULL); | 1941 parent, TRUE, NULL, NULL); |
1942 generic_dialog_add_button(gd, GTK_STOCK_CLOSE, NULL, NULL, TRUE); | 1942 generic_dialog_add_button(gd, GTK_STOCK_CLOSE, NULL, NULL, TRUE); |
1943 | 1943 |
1944 text = g_strdup_printf(_("Unable to delete the folder:\n\n%s\n\n" | 1944 text = g_strdup_printf(_("Unable to delete the folder:\n\n%s\n\n" |
1945 "This folder contains subfolders which must be moved before it can be deleted."), | 1945 "This folder contains subfolders which must be moved before it can be deleted."), |