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
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);
}
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;
{
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();