mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-08-27 20:09:23 +00:00
Port to GtkStack
This commit is contained in:
parent
28c6df4111
commit
7f7b24645e
|
@ -285,7 +285,6 @@ AM_CONDITIONAL(ENABLE_PYTHON, test x"$enable_python" = "xyes")
|
|||
dnl libgd
|
||||
LIBGD_INIT([
|
||||
tagged-entry
|
||||
stack
|
||||
_view-common
|
||||
static
|
||||
vapi
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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; }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue