~cjcurran/gnome-control-center/make-new-panel

« back to all changes in this revision

Viewing changes to panels/keyboard/keyboard-shortcuts.c

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2012-01-23 15:11:19 UTC
  • Revision ID: package-import@ubuntu.com-20120123151119-mm1xi8mdh2m5brz0
Tags: 1:3.2.2-2ubuntu2
* debian/libgnome-control-center1.symbols: restore the symbols tracking, 
  since we build external capplets we better check they don't break
* debian/rules: don't build shlibs for a library which stopped being 
  distributed in GNOME3
* debian/patches/94_git_adding_shortcuts.patch:
  - let add custom shortcuts in any categorie
* debian/patches/95_git_ctrlw_shortcut.patch:
  - ctrl-W close capplets and go back to the overwiew (lp: #863549) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
855
855
          return;
856
856
        }
857
857
 
858
 
      gtk_widget_set_sensitive (WID (builder, "add-toolbutton"),
859
 
                                group == BINDING_GROUP_USER);
860
858
      gtk_widget_set_sensitive (WID (builder, "remove-toolbutton"), FALSE);
861
859
 
862
860
      /* Fill the shortcut treeview with the keys for the selected section */
1583
1581
{
1584
1582
  GtkTreeView *treeview;
1585
1583
  GtkTreeModel *model;
 
1584
  GtkTreeModel *section_model;
 
1585
  GtkTreeIter iter;
 
1586
  gboolean found, cont;
1586
1587
 
1587
1588
  treeview = GTK_TREE_VIEW (gtk_builder_get_object (builder,
1588
1589
                                                    "shortcut_treeview"));
1589
1590
  model = gtk_tree_view_get_model (treeview);
1590
1591
 
 
1592
  /* Select the Custom Shortcuts section
 
1593
   * before adding the shortcut itself */
 
1594
  section_model = gtk_tree_view_get_model (GTK_TREE_VIEW (WID (builder, "section_treeview")));
 
1595
  cont = gtk_tree_model_get_iter_first (section_model, &iter);
 
1596
  found = FALSE;
 
1597
  while (cont)
 
1598
    {
 
1599
      BindingGroupType group;
 
1600
 
 
1601
      gtk_tree_model_get (section_model, &iter,
 
1602
                          SECTION_GROUP_COLUMN, &group,
 
1603
                          -1);
 
1604
 
 
1605
      if (group == BINDING_GROUP_USER)
 
1606
        {
 
1607
          found = TRUE;
 
1608
          break;
 
1609
        }
 
1610
      cont = gtk_tree_model_iter_next (section_model, &iter);
 
1611
    }
 
1612
  if (found)
 
1613
    {
 
1614
      GtkTreeSelection *selection;
 
1615
 
 
1616
      selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (WID (builder, "section_treeview")));
 
1617
      gtk_tree_selection_select_iter (selection, &iter);
 
1618
    }
 
1619
 
 
1620
  /* And add the shortcut */
1591
1621
  add_custom_shortcut (treeview, model);
1592
1622
}
1593
1623