diff options
author | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2017-06-25 17:17:07 -0300 |
---|---|---|
committer | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2017-12-30 13:42:16 -0300 |
commit | 57822f5c2778c2c2a1be4ee73c6fd4a5b3128069 (patch) | |
tree | 206d1f2aed9fe6ae7a71ba2e38670f1e4fad72c9 /src | |
parent | e3b1fb4ca3a13ed0a1374da2cf9dee2680c25d8e (diff) | |
download | glade-57822f5c2778c2c2a1be4ee73c6fd4a5b3128069.tar.gz |
GladeWindow: add GladeAdaptorChooser
Diffstat (limited to 'src')
-rw-r--r-- | src/glade-window.c | 6 | ||||
-rw-r--r-- | src/glade.glade | 50 |
2 files changed, 48 insertions, 8 deletions
diff --git a/src/glade-window.c b/src/glade-window.c index fc2e4885..f10d8e67 100644 --- a/src/glade-window.c +++ b/src/glade-window.c @@ -34,6 +34,7 @@ #include <gladeui/glade.h> #include <gladeui/glade-popup.h> #include <gladeui/glade-inspector.h> +#include <gladeui/glade-adaptor-chooser.h> #include <gladeui/glade-project.h> @@ -86,6 +87,7 @@ struct _GladeWindowPrivate GtkLabel *subtitle; GtkWidget *project_button; + GladeAdaptorChooser *adaptor_chooser; GtkStack *inspectors_stack; /* Cached per project inspectors */ GladeEditor *editor; /* The editor */ @@ -1577,6 +1579,8 @@ on_stack_visible_child_notify (GObject *gobject, gtk_stack_set_visible_child (priv->inspectors_stack, g_object_get_data (G_OBJECT (view), "glade-window-view-inspector")); + glade_adaptor_chooser_set_project (priv->adaptor_chooser, project); + set_sensitivity_according_to_project (window, project); refresh_undo_redo (window, project); @@ -2344,7 +2348,6 @@ on_quit_action_activate (GtkAction *action, GladeWindow *window) gtk_main_quit (); } - static void glade_window_init (GladeWindow *window) { @@ -2514,6 +2517,7 @@ glade_window_class_init (GladeWindowClass *klass) gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/glade/glade.glade"); /* Internal children */ + gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, adaptor_chooser); gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, headerbar); gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, title); gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, subtitle); diff --git a/src/glade.glade b/src/glade.glade index 78b5cdac..40fb9fd4 100644 --- a/src/glade.glade +++ b/src/glade.glade @@ -246,7 +246,7 @@ Andreas Nilsson <andreas@andreasn.se></property> <object class="GtkAction" id="previous_project_action"> <property name="label" translatable="yes">_Previous Project</property> <property name="tooltip" translatable="yes">Activate previous project</property> - <signal name="activate" handler="on_previous_project_action_activate"/> + <signal name="activate" handler="on_previous_project_action_activate" swapped="no"/> </object> <accelerator key="Page_Up" modifiers="GDK_CONTROL_MASK"/> </child> @@ -254,7 +254,7 @@ Andreas Nilsson <andreas@andreasn.se></property> <object class="GtkAction" id="next_project_action"> <property name="label" translatable="yes">_Next Project</property> <property name="tooltip" translatable="yes">Activate next project</property> - <signal name="activate" handler="on_next_project_action_activate"/> + <signal name="activate" handler="on_next_project_action_activate" swapped="no"/> </object> <accelerator key="Page_Down" modifiers="GDK_CONTROL_MASK"/> </child> @@ -532,14 +532,50 @@ Andreas Nilsson <andreas@andreasn.se></property> <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkStack" id="stack"> + <object class="GtkBox"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="transition_duration">128</property> - <property name="transition_type">crossfade</property> - <signal name="notify::visible-child" handler="on_stack_visible_child_notify" swapped="no"/> + <property name="orientation">vertical</property> <child> - <placeholder/> + <object class="GladeAdaptorChooser" id="adaptor_chooser"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="border_width">2</property> + <property name="spacing">4</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkSeparator"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkStack" id="stack"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="transition_duration">128</property> + <property name="transition_type">crossfade</property> + <signal name="notify::visible-child" handler="on_stack_visible_child_notify" swapped="no"/> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> </child> </object> <packing> |