Skip to content

Commit 55656fa

Browse files
authored
Application: use add_main_option_entries (#911)
1 parent c5d5bf2 commit 55656fa

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

src/Application.vala

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ namespace Maya {
5858
GLib.Intl.bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
5959
GLib.Intl.bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
6060
GLib.Intl.textdomain (GETTEXT_PACKAGE);
61+
62+
add_main_option_entries (APP_OPTIONS);
6163
}
6264

6365
protected override void startup () {
@@ -215,16 +217,6 @@ namespace Maya {
215217
}
216218

217219
public static int main (string[] args) {
218-
var context = new OptionContext (_("Calendar"));
219-
context.add_main_entries (Application.APP_OPTIONS, "maya");
220-
context.add_group (Gtk.get_option_group (true));
221-
222-
try {
223-
context.parse (ref args);
224-
} catch (Error e) {
225-
warning (e.message);
226-
}
227-
228220
GtkClutter.init (ref args);
229221
var app = new Application ();
230222

0 commit comments

Comments
 (0)