[gedit/wip/merge-encoding-settings: 5/23] EncodingsDialog: make displayed encodings not sortable



commit 47cc3ba910354817cb8efbfb92cd03e7830e11bc
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Tue Aug 12 18:06:56 2014 +0200

    EncodingsDialog: make displayed encodings not sortable
    
    For the displayed encodings (on the right, the encodings shown-in-menu),
    there'll be up and down buttons.

 gedit/gedit-encodings-dialog.c               |    7 -------
 gedit/resources/ui/gedit-encodings-dialog.ui |    7 +------
 2 files changed, 1 insertions(+), 13 deletions(-)
---
diff --git a/gedit/gedit-encodings-dialog.c b/gedit/gedit-encodings-dialog.c
index 284a200..3f89a6a 100644
--- a/gedit/gedit-encodings-dialog.c
+++ b/gedit/gedit-encodings-dialog.c
@@ -38,7 +38,6 @@ struct _GeditEncodingsDialogPrivate
        GtkListStore *liststore_available;
        GtkListStore *liststore_displayed;
        GtkTreeModelSort *sort_available;
-       GtkTreeModelSort *sort_displayed;
        GtkTreeView *treeview_available;
        GtkTreeView *treeview_displayed;
        GtkWidget *add_button;
@@ -124,7 +123,6 @@ gedit_encodings_dialog_class_init (GeditEncodingsDialogClass *klass)
        gtk_widget_class_bind_template_child_private (widget_class, GeditEncodingsDialog, 
liststore_available);
        gtk_widget_class_bind_template_child_private (widget_class, GeditEncodingsDialog, 
liststore_displayed);
        gtk_widget_class_bind_template_child_private (widget_class, GeditEncodingsDialog, sort_available);
-       gtk_widget_class_bind_template_child_private (widget_class, GeditEncodingsDialog, sort_displayed);
        gtk_widget_class_bind_template_child_private (widget_class, GeditEncodingsDialog, treeview_available);
        gtk_widget_class_bind_template_child_private (widget_class, GeditEncodingsDialog, treeview_displayed);
        gtk_widget_class_bind_template_child_private (widget_class, GeditEncodingsDialog, add_button);
@@ -367,11 +365,6 @@ gedit_encodings_dialog_init (GeditEncodingsDialog *dlg)
        /* Add the data */
        init_shown_in_menu_tree_model (dlg);
 
-       /* Sort model */
-       gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (dlg->priv->sort_displayed),
-                                             COLUMN_NAME,
-                                             GTK_SORT_ASCENDING);
-
        selection = gtk_tree_view_get_selection (dlg->priv->treeview_displayed);
 
        displayed_selection_changed_cb (selection, dlg);
diff --git a/gedit/resources/ui/gedit-encodings-dialog.ui b/gedit/resources/ui/gedit-encodings-dialog.ui
index b6e4d77..29cf77e 100644
--- a/gedit/resources/ui/gedit-encodings-dialog.ui
+++ b/gedit/resources/ui/gedit-encodings-dialog.ui
@@ -20,9 +20,6 @@
   <object class="GtkTreeModelSort" id="sort_available">
     <property name="model">liststore_available</property>
   </object>
-  <object class="GtkTreeModelSort" id="sort_displayed">
-    <property name="model">liststore_displayed</property>
-  </object>
   <template class="GeditEncodingsDialog" parent="GtkDialog">
     <property name="width_request">650</property>
     <property name="height_request">400</property>
@@ -252,7 +249,7 @@
                     <property name="is_focus">False</property>
                     <property name="hexpand">True</property>
                     <property name="vexpand">True</property>
-                    <property name="model">sort_displayed</property>
+                    <property name="model">liststore_displayed</property>
                     <child internal-child="selection">
                       <object class="GtkTreeSelection" id="treeview-selection1">
                         <property name="mode">multiple</property>
@@ -261,7 +258,6 @@
                     <child>
                       <object class="GtkTreeViewColumn" id="treeviewcolumn3">
                         <property name="title" translatable="yes">_Description</property>
-                        <property name="sort_column_id">0</property>
                         <child>
                           <object class="GtkCellRendererText" id="cellrenderertext3"/>
                           <attributes>
@@ -273,7 +269,6 @@
                     <child>
                       <object class="GtkTreeViewColumn" id="treeviewcolumn4">
                         <property name="title" translatable="yes">_Encoding</property>
-                        <property name="sort_column_id">1</property>
                         <child>
                           <object class="GtkCellRendererText" id="cellrenderertext4"/>
                           <attributes>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]