#include <stdlib.h>
GtkWidget *mainwin = NULL;
+GtkWidget *tabstrip = NULL;
GladeXML *glade;
xmlDocPtr doc;
xmlNodePtr root;
RrInstance *rrinst;
gchar *obc_config_file = NULL;
+gint obc_tab;
ObtPaths *paths;
ObtXmlInst *parse_i;
g_print(_(" --install ARCHIVE.obt Install the given theme archive and select it\n"));
g_print(_(" --archive THEME Create a theme archive from the given theme directory\n"));
g_print(_(" --config-file FILE Specify the path to the config file to use\n"));
+ g_print(_(" --tab NUMBER Switch to tab number NUMBER on startup\n"));
g_print(_("\nPlease report bugs at %s\n\n"), PACKAGE_BUGREPORT);
-
+
exit(EXIT_SUCCESS);
}
g_printerr(_("--config-file requires an argument\n"));
else
obc_config_file = argv[++i];
- } else
+ }
+ else if (!strcmp(argv[i], "--tab")) {
+ if (i == argc - 1) /* no args left */
+ g_printerr(_("--tab requires an argument\n"));
+ else
+ obc_tab = MAX(atoi(argv[++i]) - 1, 0);
+ }
+ else
obc_theme_install = argv[i];
}
}
dock_setup_tab();
mainwin = get_widget("main_window");
+ tabstrip = glade_xml_get_widget(glade, "tabstrip");
if (obc_theme_install)
theme_install(obc_theme_install);
gtk_widget_show_all(mainwin);
+ /* Focus on the tab number specified by --tab. */
+ if (obc_tab)
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(tabstrip), obc_tab);
+
+
sn_d = sn_display_new(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()),
NULL, NULL);
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkNotebook" id="notebook1">
+ <widget class="GtkNotebook" id="tabstrip">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tab_pos">left</property>