Changeset 2553


Ignore:
Timestamp:
Jul 30, 2007, 3:51:37 PM (15 years ago)
Author:
charles
Message:

(gtk) add select-all, deselect-all

Location:
trunk/gtk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/actions.c

    r2525 r2553  
    6969  { "quit", GTK_STOCK_QUIT,
    7070    N_("_Quit"), "<control>Q", NULL, G_CALLBACK(action_cb) },
     71  { "select-all", GTK_STOCK_SELECT_ALL,
     72    N_("Select _All"), "<control>A", NULL, G_CALLBACK(action_cb) },
     73  { "unselect-all", NULL,
     74    N_("_Deselect All"), "<control>U", NULL, G_CALLBACK(action_cb) },
    7175  { "edit-preferences", GTK_STOCK_PREFERENCES,
    7276    N_("Edit _Preferences"), NULL, NULL, G_CALLBACK(action_cb) },
  • trunk/gtk/main.c

    r2491 r2553  
    10201020        askquit( data->core, data->wind, wannaquit, data );
    10211021    }
     1022    else if (!strcmp (action_name, "select-all"))
     1023    {
     1024        GtkTreeSelection * s = tr_window_get_selection(data->wind);
     1025        gtk_tree_selection_select_all( s );
     1026    }
     1027    else if (!strcmp (action_name, "unselect-all"))
     1028    {
     1029        GtkTreeSelection * s = tr_window_get_selection(data->wind);
     1030        gtk_tree_selection_unselect_all( s );
     1031    }
    10221032    else if (!strcmp (action_name, "edit-preferences"))
    10231033    {
  • trunk/gtk/ui.h

    r2316 r2553  
    1515"    </menu>\n"
    1616"    <menu action='edit-menu'>\n"
     17"      <menuitem action='select-all'/>\n"
     18"      <menuitem action='unselect-all'/>\n"
     19"      <separator/>\n"
    1720"      <menuitem action='show-torrent-inspector'/>\n"
    1821"      <menuitem action='edit-preferences'/>\n"
Note: See TracChangeset for help on using the changeset viewer.