comparison src/search.c @ 1292:4a3ae0e6f1eb

droped Preferences dialog, sidebar should replace it completely
author nadvornik
date Sat, 14 Feb 2009 20:26:30 +0000
parents 10073464e6aa
children e8f21b91885d
comparison
equal deleted inserted replaced
1291:50ae02a4a675 1292:4a3ae0e6f1eb
12 12
13 13
14 #include "main.h" 14 #include "main.h"
15 #include "search.h" 15 #include "search.h"
16 16
17 #include "bar_info.h"
18 #include "cache.h" 17 #include "cache.h"
19 #include "collect.h" 18 #include "collect.h"
20 #include "collect-table.h" 19 #include "collect-table.h"
21 #include "dnd.h" 20 #include "dnd.h"
22 #include "dupe.h" 21 #include "dupe.h"
23 #include "editors.h" 22 #include "editors.h"
24 #include "filedata.h" 23 #include "filedata.h"
25 #include "image-load.h" 24 #include "image-load.h"
26 #include "img-view.h" 25 #include "img-view.h"
27 #include "info.h"
28 #include "layout_image.h" 26 #include "layout_image.h"
29 #include "menu.h" 27 #include "menu.h"
30 #include "metadata.h" 28 #include "metadata.h"
31 #include "misc.h" 29 #include "misc.h"
32 #include "print.h" 30 #include "print.h"
39 #include "ui_tabcomp.h" 37 #include "ui_tabcomp.h"
40 #include "ui_tree_edit.h" 38 #include "ui_tree_edit.h"
41 #include "uri_utils.h" 39 #include "uri_utils.h"
42 #include "utilops.h" 40 #include "utilops.h"
43 #include "window.h" 41 #include "window.h"
42 #include "bar_keywords.h"
44 43
45 #include <gdk/gdkkeysyms.h> /* for keyboard values */ 44 #include <gdk/gdkkeysyms.h> /* for keyboard values */
46 45
47 46
48 #define DEF_SEARCH_WIDTH 700 47 #define DEF_SEARCH_WIDTH 700
914 if (!sd) return; 913 if (!sd) return;
915 914
916 search_result_edit_selected(sd, key); 915 search_result_edit_selected(sd, key);
917 } 916 }
918 917
919 static void sr_menu_info_cb(GtkWidget *widget, gpointer data)
920 {
921 SearchData *sd = data;
922
923 info_window_new(NULL, search_result_selection_list(sd), NULL);
924 }
925
926 static void sr_menu_collection_cb(GtkWidget *widget, gpointer data) 918 static void sr_menu_collection_cb(GtkWidget *widget, gpointer data)
927 { 919 {
928 SearchData *sd = data; 920 SearchData *sd = data;
929 921
930 search_result_collection_from_selection(sd); 922 search_result_collection_from_selection(sd);
1003 menu_item_add_sensitive(menu, _("Select none"), !empty, 995 menu_item_add_sensitive(menu, _("Select none"), !empty,
1004 G_CALLBACK(sr_menu_select_none_cb), sd); 996 G_CALLBACK(sr_menu_select_none_cb), sd);
1005 menu_item_add_divider(menu); 997 menu_item_add_divider(menu);
1006 submenu_add_edit(menu, &item, G_CALLBACK(sr_menu_edit_cb), sd); 998 submenu_add_edit(menu, &item, G_CALLBACK(sr_menu_edit_cb), sd);
1007 if (!on_row) gtk_widget_set_sensitive(item, FALSE); 999 if (!on_row) gtk_widget_set_sensitive(item, FALSE);
1008 menu_item_add_stock_sensitive(menu, _("_Properties"), GTK_STOCK_PROPERTIES, on_row,
1009 G_CALLBACK(sr_menu_info_cb), sd);
1010 menu_item_add_stock_sensitive(menu, _("Add to new collection"), GTK_STOCK_INDEX, on_row, 1000 menu_item_add_stock_sensitive(menu, _("Add to new collection"), GTK_STOCK_INDEX, on_row,
1011 G_CALLBACK(sr_menu_collection_cb), sd); 1001 G_CALLBACK(sr_menu_collection_cb), sd);
1012 menu_item_add_stock_sensitive(menu, _("Print..."), GTK_STOCK_PRINT, on_row, 1002 menu_item_add_stock_sensitive(menu, _("Print..."), GTK_STOCK_PRINT, on_row,
1013 G_CALLBACK(sr_menu_print_cb), sd); 1003 G_CALLBACK(sr_menu_print_cb), sd);
1014 menu_item_add_divider(menu); 1004 menu_item_add_divider(menu);
1259 file_util_rename(NULL, search_result_selection_list(sd), widget); 1249 file_util_rename(NULL, search_result_selection_list(sd), widget);
1260 break; 1250 break;
1261 case 'D': case 'd': 1251 case 'D': case 'd':
1262 file_util_delete(NULL, search_result_selection_list(sd), widget); 1252 file_util_delete(NULL, search_result_selection_list(sd), widget);
1263 break; 1253 break;
1264 case 'P': case 'p':
1265 info_window_new(NULL, search_result_selection_list(sd), NULL);
1266 break;
1267 case 'A': case 'a': 1254 case 'A': case 'a':
1268 if (event->state & GDK_SHIFT_MASK) 1255 if (event->state & GDK_SHIFT_MASK)
1269 { 1256 {
1270 gtk_tree_selection_unselect_all(selection); 1257 gtk_tree_selection_unselect_all(selection);
1271 } 1258 }