Commit 43173feb authored by Christian Hergert's avatar Christian Hergert
Browse files

greeter: tweak action bar usage for greeter workspace

parent 13590aa1
......@@ -65,6 +65,7 @@ struct _IdeGreeterWorkspace
GtkButton *back_button;
GtkButton *select_button;
GtkActionBar *action_bar;
GtkActionBar *projects_action_bar;
GtkLabel *title;
IdeGreeterButtonsSection *buttons_section;
......@@ -587,15 +588,16 @@ ide_greeter_workspace_class_init (IdeGreeterWorkspaceClass *klass)
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/builder/ui/ide-greeter-workspace.ui");
gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, action_bar);
gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, buttons_section);
gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, back_button);
gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, buttons_section);
gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, clone_surface);
gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, header_bar);
gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, left_box);
gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, projects_action_bar);
gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, search_entry);
gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, sections);
gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, select_button);
gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, surfaces);
gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, sections);
gtk_widget_class_bind_template_child (widget_class, IdeGreeterWorkspace, title);
gtk_widget_class_bind_template_callback (widget_class, stack_notify_visible_child_cb);
......@@ -807,6 +809,7 @@ ide_greeter_workspace_set_selection_mode (IdeGreeterWorkspace *self,
ide_greeter_workspace_set_selection_mode_cb,
GINT_TO_POINTER (selection_mode));
gtk_widget_set_visible (GTK_WIDGET (self->action_bar), selection_mode);
gtk_widget_set_visible (GTK_WIDGET (self->projects_action_bar), !selection_mode);
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_SELECTION_MODE]);
}
}
......@@ -118,7 +118,7 @@
</object>
</child>
<child>
<object class="GtkActionBar" id="project_action_bar">
<object class="GtkActionBar" id="projects_action_bar">
<property name="visible">true</property>
<child>
<object class="IdeGreeterButtonsSection" id="buttons_section">
......@@ -130,28 +130,39 @@
</child>
<child>
<object class="GtkActionBar" id="action_bar">
<child>
<object class="GtkButton" id="remove_button">
<property name="action-name">win.delete-selected-rows</property>
<property name="label" translatable="yes">_Remove Projects</property>
<property name="use-underline">true</property>
<child type="center">
<object class="GtkBox">
<property name="width-request">600</property>
<property name="orientation">horizontal</property>
<property name="homogeneous">true</property>
<property name="margin-bottom">6</property>
<property name="margin-top">6</property>
<property name="spacing">10</property>
<property name="visible">true</property>
<property name="sensitive">false</property>
<style>
<class name="destructive-action"/>
</style>
</object>
</child>
<child>
<object class="GtkButton" id="purge_button">
<property name="action-name">win.purge-selected-rows</property>
<property name="label" translatable="yes">Remove Projects and Sources…</property>
<property name="use-underline">true</property>
<property name="visible">true</property>
<property name="sensitive">false</property>
<style>
<class name="destructive-action"/>
</style>
<child>
<object class="GtkButton" id="remove_button">
<property name="action-name">win.delete-selected-rows</property>
<property name="label" translatable="yes">_Remove Projects</property>
<property name="use-underline">true</property>
<property name="visible">true</property>
<property name="sensitive">false</property>
<style>
<class name="destructive-action"/>
</style>
</object>
</child>
<child>
<object class="GtkButton" id="purge_button">
<property name="action-name">win.purge-selected-rows</property>
<property name="label" translatable="yes">Remove Projects and Sources…</property>
<property name="use-underline">true</property>
<property name="visible">true</property>
<property name="sensitive">false</property>
<style>
<class name="destructive-action"/>
</style>
</object>
</child>
</object>
</child>
</object>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment