[gitg] Port to GtkStack



commit 7f7b24645e70fea8d30b26dc3ed741e523aff5bd
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Thu May 30 23:28:21 2013 +0800

    Port to GtkStack

 configure.ac                              |    1 -
 gitg/gitg-ui-elements.vala                |    6 +++---
 gitg/gitg-window.vala                     |   16 ++++++++--------
 gitg/resources/ui/gitg-window.ui          |    6 +++---
 libgitg-ext/gitg-ext-view.vala            |    2 +-
 plugins/history/gitg-history.vala         |    6 +++---
 plugins/history/resources/view-history.ui |    2 +-
 7 files changed, 19 insertions(+), 20 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index fb0829f..5caab5b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -285,7 +285,6 @@ AM_CONDITIONAL(ENABLE_PYTHON, test x"$enable_python" = "xyes")
 dnl libgd
 LIBGD_INIT([
        tagged-entry
-       stack
        _view-common
        static
        vapi
diff --git a/gitg/gitg-ui-elements.vala b/gitg/gitg-ui-elements.vala
index 961d5b4..d6edc89 100644
--- a/gitg/gitg-ui-elements.vala
+++ b/gitg/gitg-ui-elements.vala
@@ -26,7 +26,7 @@ public class UIElements<T>
        private HashTable<string, GitgExt.UIElement> d_elements;
        private List<GitgExt.UIElement> d_available_elements;
        private GitgExt.UIElement? d_current;
-       private Gd.Stack d_stack;
+       private Gtk.Stack d_stack;
 
        public signal void activated(GitgExt.UIElement element);
 
@@ -149,7 +149,7 @@ public class UIElements<T>
                d_stack.add_with_properties(e.widget,
                                            "name", e.id,
                                            "title", e.display_name,
-                                           "symbolic-icon-name", e.icon);
+                                           "icon-name", e.icon);
 
                int insert_position = 0;
                unowned List<GitgExt.UIElement> item = d_available_elements;
@@ -228,7 +228,7 @@ public class UIElements<T>
        }
 
        public UIElements(Peas.ExtensionSet extensions,
-                         Gd.Stack? stack = null)
+                         Gtk.Stack? stack = null)
        {
                d_extensions = extensions;
                d_stack = stack;
diff --git a/gitg/gitg-window.vala b/gitg/gitg-window.vala
index ec804f0..f96f8bb 100644
--- a/gitg/gitg-window.vala
+++ b/gitg/gitg-window.vala
@@ -40,16 +40,16 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable, Gtk.
        private MenuModel d_views_model;
 
        private Gtk.Button d_button_dash;
-       private Gd.StackSwitcher d_commit_view_switcher;
+       private Gtk.StackSwitcher d_commit_view_switcher;
 
        private Gd.TaggedEntry d_search_entry;
 
-       private Gd.Stack d_main_stack;
+       private Gtk.Stack d_main_stack;
 
        private Gtk.ScrolledWindow d_dash_scrolled_window;
        private GitgGtk.DashView d_dash_view;
 
-       private Gd.Stack d_stack_view;
+       private Gtk.Stack d_stack_view;
 
        private static const ActionEntry[] win_entries = {
                {"search", on_search_activated, null, "false", null},
@@ -139,7 +139,7 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable, Gtk.
 
                        d_header_bar.set_subtitle(Markup.escape_text(head_name));
 
-                       d_main_stack.transition_type = Gd.StackTransitionType.SLIDE_LEFT;
+                       d_main_stack.transition_type = Gtk.StackTransitionType.SLIDE_LEFT;
                        d_main_stack.set_visible_child(d_stack_view);
                        d_commit_view_switcher.show();
                        d_button_dash.show();
@@ -153,7 +153,7 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable, Gtk.
                        d_header_bar.set_title(_("Projects"));
                        d_header_bar.set_subtitle(null);
 
-                       d_main_stack.transition_type = Gd.StackTransitionType.SLIDE_RIGHT;
+                       d_main_stack.transition_type = Gtk.StackTransitionType.SLIDE_RIGHT;
                        d_main_stack.set_visible_child(d_dash_scrolled_window);
                        d_commit_view_switcher.hide();
                        d_button_dash.hide();
@@ -442,7 +442,7 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable, Gtk.
                        event.free();
                });
 
-               d_main_stack = builder.get_object("main_stack") as Gd.Stack;
+               d_main_stack = builder.get_object("main_stack") as Gtk.Stack;
 
                d_dash_scrolled_window = builder.get_object("dash_scrolled_window") as Gtk.ScrolledWindow;
                d_dash_view = builder.get_object("dash_view") as GitgGtk.DashView;
@@ -450,9 +450,9 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable, Gtk.
                        repository = r;
                });
 
-               d_stack_view = builder.get_object("stack_view") as Gd.Stack;
+               d_stack_view = builder.get_object("stack_view") as Gtk.Stack;
 
-               d_commit_view_switcher = builder.get_object("commit-view-switcher") as Gd.StackSwitcher;
+               d_commit_view_switcher = builder.get_object("commit-view-switcher") as Gtk.StackSwitcher;
 
                d_gear_menu = builder.get_object("gear-menubutton") as Gtk.MenuButton;
 
diff --git a/gitg/resources/ui/gitg-window.ui b/gitg/resources/ui/gitg-window.ui
index 9362320..4c9b020 100644
--- a/gitg/resources/ui/gitg-window.ui
+++ b/gitg/resources/ui/gitg-window.ui
@@ -55,7 +55,7 @@
           </packing>
         </child>
         <child>
-          <object class="GdStackSwitcher" id="commit-view-switcher">
+          <object class="GtkStackSwitcher" id="commit-view-switcher">
             <property name="visible">False</property>
           </object>
           <packing>
@@ -169,7 +169,7 @@
           </packing>
         </child>
         <child>
-          <object class="GdStack" id="main_stack">
+          <object class="GtkStack" id="main_stack">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="hexpand">True</property>
@@ -197,7 +197,7 @@
               </object>
             </child>
             <child>
-              <object class="GdStack" id="stack_view">
+              <object class="GtkStack" id="stack_view">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
               </object>
diff --git a/libgitg-ext/gitg-ext-view.vala b/libgitg-ext/gitg-ext-view.vala
index d0ed254..1a8ebb2 100644
--- a/libgitg-ext/gitg-ext-view.vala
+++ b/libgitg-ext/gitg-ext-view.vala
@@ -82,7 +82,7 @@ public interface View : Object, UIElement
         */
        public abstract bool is_default_for(string action);
 
-       public abstract Gd.Stack stack_panel { get; }
+       public abstract Gtk.Stack stack_panel { get; }
 }
 
 }
diff --git a/plugins/history/gitg-history.vala b/plugins/history/gitg-history.vala
index 7c94881..8b3d905 100644
--- a/plugins/history/gitg-history.vala
+++ b/plugins/history/gitg-history.vala
@@ -37,7 +37,7 @@ namespace GitgHistory
                private Gtk.Paned d_main;
                private GitgHistory.NavigationView d_navigation;
                private Gtk.Paned d_paned_panels;
-               private Gd.Stack d_stack_panel;
+               private Gtk.Stack d_stack_panel;
                private Gtk.TreeView d_commit_list;
 
                public string id
@@ -45,7 +45,7 @@ namespace GitgHistory
                        owned get { return "/org/gnome/gitg/Views/History"; }
                }
 
-               public Gd.Stack stack_panel
+               public Gtk.Stack stack_panel
                {
                        get { return d_stack_panel; }
                }
@@ -216,7 +216,7 @@ namespace GitgHistory
                        }
 
                        d_paned_panels = ret["paned_panels"] as Gtk.Paned;
-                       d_stack_panel = ret["stack_panel"] as Gd.Stack;
+                       d_stack_panel = ret["stack_panel"] as Gtk.Stack;
 
                        d_commit_list = ret["commit_list_view"] as Gtk.TreeView;
                        d_commit_list.model = d_model;
diff --git a/plugins/history/resources/view-history.ui b/plugins/history/resources/view-history.ui
index 601442c..8a0ba1f 100644
--- a/plugins/history/resources/view-history.ui
+++ b/plugins/history/resources/view-history.ui
@@ -115,7 +115,7 @@
           </object>
         </child>
         <child>
-          <object class="GdStack" id="stack_panel">
+          <object class="GtkStack" id="stack_panel">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <child>


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