Add an opening tab to the main window

It displays a message stating there are no configured GitLab instances
This commit is contained in:
Gergely Polonkai 2014-10-14 17:17:44 +02:00
parent 180c3e2703
commit f8a419aab1
2 changed files with 48 additions and 0 deletions

View File

@ -12,6 +12,9 @@ namespace GnomeGitlab
[GtkChild]
private Gtk.HeaderBar header_bar;
[GtkChild]
private Gtk.Label no_instance_label;
private GLib.Settings settings;
public Window (Application app)
@ -20,6 +23,8 @@ namespace GnomeGitlab
add_action_entries (action_entries, this);
no_instance_label.set_markup("<b><span size='xx-large'>%s</span></b>".printf(_("No instances configured. Go to preferences to set things up!")));
settings = new Settings ("eu.polonkai.gergely.gnome-gitlab.state.window");
settings.delay ();

View File

@ -8,5 +8,48 @@
<object class="GtkHeaderBar" id="header_bar">
</object>
</child>
<child>
<object class="GtkGrid">
<child>
<object class="GtkStack" id="project_tabs">
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkImage">
<property name="yalign">1</property>
<property name="ypad">1</property>
<property name="icon-name">system-software-install-symbolic</property>
<property name="icon-size">6</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="no_instance_label">
<!-- This label gets overwritten in window.vala with an easily translatable markup -->
<property name="label" translatable="no">No instances configured. Go to preferences to set things up!</property>
<property name="yalign">0.3</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</object>
<packing>
<property name="name">no-instances</property>
</packing>
</child>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
</object>
</child>
</template>
</interface>