]> git.armaanb.net Git - chorizo.git/blobdiff - src/browser.c
Rename project to chorizo
[chorizo.git] / src / browser.c
index 58d9275e7cb1675f38f97ce53b9305399ee8f42d..1d38e10fa408027e55413e7e9935b79e7dfeca90 100644 (file)
@@ -214,7 +214,7 @@ client_new(const gchar *uri, WebKitWebView *related_wv, gboolean show,
                                                                         G_CALLBACK(key_tablabel), c);
 
        /* For easy access, store a reference to our label. */
-       g_object_set_data(G_OBJECT(evbox), "lariza-tab-label", c->tablabel);
+       g_object_set_data(G_OBJECT(evbox), "chorizo-tab-label", c->tablabel);
 
        /* This only shows the event box and the label inside, nothing else.
         * Needed because the evbox/label is "internal" to the notebook and
@@ -1025,7 +1025,7 @@ mainwindow_title(gint idx)
                return;
 
        widg = gtk_notebook_get_tab_label(GTK_NOTEBOOK(mw.notebook), child);
-       tablabel = (GtkWidget *)g_object_get_data(G_OBJECT(widg), "lariza-tab-label");
+       tablabel = (GtkWidget *)g_object_get_data(G_OBJECT(widg), "chorizo-tab-label");
        text = gtk_label_get_text(GTK_LABEL(tablabel));
        gtk_window_set_title(GTK_WINDOW(mw.win), text);
 }
@@ -1145,18 +1145,17 @@ GKeyFile *
 get_ini(void)
 {
        GKeyFileFlags flags = G_KEY_FILE_NONE;
-       g_autoptr(GError) error = NULL;
        config = g_key_file_new();
 
        // Load user config
        if (!g_key_file_load_from_file(config,
                                                                                                                                 g_build_filename(g_get_user_config_dir(),
-                                                                                                                                                                                                       __NAME__, "lariza.ini",
-                                                                                                                                                                                                       NULL), flags, &error)) {
+                                                                                                                                                                                                       __NAME__, "chorizo.ini",
+                                                                                                                                                                                                       NULL), flags, NULL)) {
                // Load global config
-               if (!g_key_file_load_from_file(config, "/etc/lariza.ini", flags,
-                                                                                                                                        &error)) {
-                       fprintf(stderr, "Could not load lariza.ini: %s", error->message);
+               if (!g_key_file_load_from_file(config, "/etc/chorizo.ini", flags,
+                                                                                                                                        NULL)) {
+                       fprintf(stderr, "Could not load chorizo.ini");
                }
        }
        return config;
@@ -1167,20 +1166,23 @@ main(int argc, char **argv)
 {
        int opt, i;
 
-       gtk_init(&argc, &argv);
-       get_config();
-
-       while ((opt = getopt(argc, argv, "C")) != -1) {
+       while ((opt = getopt(argc, argv, "Cv")) != -1) {
                switch (opt) {
                case 'C':
                        cfg.cooperative_instances = FALSE;
                        break;
+               case 'v':
+                       printf("%s %s\n", __NAME__, VERSION);
+                       exit(0);
                default:
                        fprintf(stderr, "Usage: "__NAME__" [OPTION]... [URI]...\n");
                        exit(EXIT_FAILURE);
                }
        }
 
+       gtk_init(&argc, &argv);
+       get_config();
+
        if (cfg.cooperative_instances)
                cooperation_setup();