Mercurial > geeqie.yaz
changeset 479:5212d4fed37f
Ensure Properties dialog is displayed above fullscreen window.
Add a parameter to info_window_new() to pass parent window and
revert patch 472.
author | zas_ |
---|---|
date | Tue, 22 Apr 2008 08:16:02 +0000 |
parents | 9e54275835fb |
children | 805c3258d228 |
files | src/collect-table.c src/collect.c src/dupe.c src/img-view.c src/info.c src/info.h src/layout_image.c src/layout_util.c src/pan-view.c src/search.c src/view_file_icon.c src/view_file_list.c |
diffstat | 12 files changed, 27 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/src/collect-table.c Mon Apr 21 22:19:32 2008 +0000 +++ b/src/collect-table.c Tue Apr 22 08:16:02 2008 +0000 @@ -594,7 +594,7 @@ { CollectTable *ct = data; - info_window_new(NULL, collection_table_popup_file_list(ct)); + info_window_new(NULL, collection_table_popup_file_list(ct), NULL); } static void collection_table_popup_copy_cb(GtkWidget *widget, gpointer data)
--- a/src/collect.c Mon Apr 21 22:19:32 2008 +0000 +++ b/src/collect.c Tue Apr 22 08:16:02 2008 +0000 @@ -871,7 +871,7 @@ file_util_delete(NULL, collection_table_selection_get_list(cw->table), cw->window); break; case 'P': case 'p': - info_window_new(NULL, collection_table_selection_get_list(cw->table)); + info_window_new(NULL, collection_table_selection_get_list(cw->table), NULL); break; case 'S': case 's': collection_dialog_save_as(NULL, cw->cd);
--- a/src/dupe.c Mon Apr 21 22:19:32 2008 +0000 +++ b/src/dupe.c Tue Apr 22 08:16:02 2008 +0000 @@ -2147,7 +2147,7 @@ { DupeWindow *dw = data; - info_window_new(NULL, dupe_listview_get_selection(dw, dw->listview)); + info_window_new(NULL, dupe_listview_get_selection(dw, dw->listview), NULL); } static void dupe_menu_collection_cb(GtkWidget *widget, gpointer data) @@ -2926,7 +2926,7 @@ file_util_delete(NULL, dupe_listview_get_selection(dw, listview), dw->window); break; case 'P': case 'p': - info_window_new(NULL, dupe_listview_get_selection(dw, listview)); + info_window_new(NULL, dupe_listview_get_selection(dw, listview), NULL); break; default: stop_signal = FALSE;
--- a/src/img-view.c Mon Apr 21 22:19:32 2008 +0000 +++ b/src/img-view.c Tue Apr 22 08:16:02 2008 +0000 @@ -419,7 +419,7 @@ file_util_delete(image_get_fd(imd), NULL, imd->widget); break; case 'P': case 'p': - info_window_new(image_get_fd(imd), NULL); + info_window_new(image_get_fd(imd), NULL, vw->fs ? vw->fs->window : NULL); break; case 'W': case 'w': view_window_close(vw); @@ -1114,10 +1114,8 @@ ViewWindow *vw = data; ImageWindow *imd; - if (vw->fs) view_fullscreen_toggle(vw, FALSE); - imd = view_window_active_image(vw); - info_window_new(image_get_fd(imd), NULL); + info_window_new(image_get_fd(imd), NULL, vw->fs ? vw->fs->window : NULL); } static void view_wallpaper_cb(GtkWidget *widget, gpointer data)
--- a/src/info.c Mon Apr 21 22:19:32 2008 +0000 +++ b/src/info.c Tue Apr 22 08:16:02 2008 +0000 @@ -753,7 +753,7 @@ g_free(id); } -void info_window_new(FileData *fd, GList *list) +void info_window_new(FileData *fd, GList *list, GtkWidget *parent) { InfoData *id; GtkWidget *main_vbox; @@ -778,7 +778,14 @@ id->window = window_new(GTK_WINDOW_TOPLEVEL, "properties", NULL, NULL, _("Image properties")); gtk_window_set_type_hint(GTK_WINDOW(id->window), GDK_WINDOW_TYPE_HINT_DIALOG); - + id->parent = parent; + if (GTK_IS_WINDOW(id->parent)) { + gtk_window_set_keep_above(GTK_WINDOW(id->window), TRUE); +#if 0 + /* work, but behavior is not that great */ + gtk_window_set_transient_for(GTK_WINDOW(id->window), GTK_WINDOW(id->parent)); +#endif + } gtk_window_set_resizable(GTK_WINDOW(id->window), TRUE); geometry.min_width = 32;
--- a/src/info.h Mon Apr 21 22:19:32 2008 +0000 +++ b/src/info.h Tue Apr 22 08:16:02 2008 +0000 @@ -19,6 +19,8 @@ struct _InfoData { GtkWidget *window; + GtkWidget *parent; + ImageWindow *image; GList *list; @@ -38,7 +40,7 @@ }; -void info_window_new(FileData *fd, GList *list); +void info_window_new(FileData *fd, GList *list, GtkWidget *parent); GtkWidget *table_add_line(GtkWidget *table, gint x, gint y, const gchar *description, const gchar *text);
--- a/src/layout_image.c Mon Apr 21 22:19:32 2008 +0000 +++ b/src/layout_image.c Tue Apr 22 08:16:02 2008 +0000 @@ -182,7 +182,7 @@ file_util_delete(layout_image_get_fd(lw), NULL, widget); break; case 'P': case 'p': - info_window_new(layout_image_get_fd(lw), NULL); + info_window_new(layout_image_get_fd(lw), NULL, NULL); break; case 'Q': case 'q': exit_program(); @@ -615,8 +615,7 @@ { LayoutWindow *lw = data; - if (lw->full_screen) layout_image_full_screen_stop(lw); - info_window_new(layout_image_get_fd(lw), NULL); + info_window_new(layout_image_get_fd(lw), NULL, lw->full_screen ? lw->full_screen->window : NULL); } static void li_pop_menu_new_cb(GtkWidget *widget, gpointer data)
--- a/src/layout_util.c Mon Apr 21 22:19:32 2008 +0000 +++ b/src/layout_util.c Tue Apr 22 08:16:02 2008 +0000 @@ -354,7 +354,7 @@ list = layout_selection_list(lw); if (!list) fd = layout_image_get_fd(lw); - info_window_new(fd, list); + info_window_new(fd, list, NULL); }
--- a/src/pan-view.c Mon Apr 21 22:19:32 2008 +0000 +++ b/src/pan-view.c Tue Apr 22 08:16:02 2008 +0000 @@ -1311,7 +1311,7 @@ if (fd) file_util_delete(fd, NULL, GTK_WIDGET(pr)); break; case 'P': case 'p': - if (fd) info_window_new(fd, NULL); + if (fd) info_window_new(fd, NULL, NULL); break; case 'F': case 'f': pan_search_toggle_visible(pw, TRUE); @@ -2677,7 +2677,7 @@ FileData *fd; fd = pan_menu_click_fd(pw); - if (fd) info_window_new(fd, NULL); + if (fd) info_window_new(fd, NULL, NULL); } static void pan_zoom_in_cb(GtkWidget *widget, gpointer data)
--- a/src/search.c Mon Apr 21 22:19:32 2008 +0000 +++ b/src/search.c Tue Apr 22 08:16:02 2008 +0000 @@ -900,7 +900,7 @@ { SearchData *sd = data; - info_window_new(NULL, search_result_selection_list(sd)); + info_window_new(NULL, search_result_selection_list(sd), NULL); } static void sr_menu_collection_cb(GtkWidget *widget, gpointer data) @@ -1232,7 +1232,7 @@ file_util_delete(NULL, search_result_selection_list(sd), widget); break; case 'P': case 'p': - info_window_new(NULL, search_result_selection_list(sd)); + info_window_new(NULL, search_result_selection_list(sd), NULL); break; case 'A': case 'a': if (event->state & GDK_SHIFT_MASK)
--- a/src/view_file_icon.c Mon Apr 21 22:19:32 2008 +0000 +++ b/src/view_file_icon.c Tue Apr 22 08:16:02 2008 +0000 @@ -191,7 +191,7 @@ { ViewFileIcon *vfi = data; - info_window_new(NULL, vficon_pop_menu_file_list(vfi)); + info_window_new(NULL, vficon_pop_menu_file_list(vfi), NULL); } static void vficon_pop_menu_view_cb(GtkWidget *widget, gpointer data)
--- a/src/view_file_list.c Mon Apr 21 22:19:32 2008 +0000 +++ b/src/view_file_list.c Tue Apr 22 08:16:02 2008 +0000 @@ -316,7 +316,7 @@ { ViewFileList *vfl = data; - info_window_new(NULL, vflist_pop_menu_file_list(vfl)); + info_window_new(NULL, vflist_pop_menu_file_list(vfl), NULL); } static void vflist_pop_menu_view_cb(GtkWidget *widget, gpointer data)