6 changed files with 67 additions and 0 deletions
@ -0,0 +1,28 @@
|
||||
namespace GnomeGitlab |
||||
{ |
||||
[GtkTemplate (ui = "/eu/polonkai/gergely/gnome-gitlab/ui/gg-preferences.ui")] |
||||
|
||||
public class Preferences : Gtk.Dialog |
||||
{ |
||||
private static GLib.Once<Preferences> instance; |
||||
|
||||
private Preferences () { |
||||
response.connect (() => { |
||||
hide (); |
||||
}); |
||||
} |
||||
|
||||
public static void show (Window parent) |
||||
{ |
||||
Preferences inst; |
||||
|
||||
inst = instance.once (() => { return new Preferences (); }); |
||||
|
||||
if (parent != inst.get_transient_for ()) { |
||||
inst.set_transient_for (parent); |
||||
} |
||||
|
||||
inst.present (); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<requires lib="gtk+" version="3.12"/> |
||||
<template class="GnomeGitlabPreferences" parent="GtkDialog"> |
||||
<property name="title" translatable="yes">Preferences</property> |
||||
<property name="type_hint">normal</property> |
||||
<property name="can_focus">False</property> |
||||
<child internal-child="vbox"> |
||||
<object class="GtkBox"> |
||||
<child> |
||||
<object class="GtkLabel"> |
||||
<property name="visible">True</property> |
||||
<property name="label">Preferences dialog</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
</template> |
||||
</interface> |
Loading…
Reference in new issue