add --show-page option to specify the page with which to start
2007-06-17 Jens Granseuer <jensgr@gmx.net> * appearance-main.c: (main): * appearance.glade: add --show-page option to specify the page with which to start svn path=/trunk/; revision=7739
This commit is contained in:
parent
45b4503f34
commit
a74694884b
3 changed files with 53 additions and 20 deletions
|
@ -1,3 +1,9 @@
|
|||
2007-06-17 Jens Granseuer <jensgr@gmx.net>
|
||||
|
||||
* appearance-main.c: (main):
|
||||
* appearance.glade: add --show-page option to specify the page with
|
||||
which to start
|
||||
|
||||
2007-06-17 Denis Washington <denisw@svn.gnome.org>
|
||||
|
||||
* appearance-desktop.c: (desktop_init): (wp_view_tooltip_cb):
|
||||
|
|
|
@ -88,21 +88,29 @@ int
|
|||
main (int argc, char **argv)
|
||||
{
|
||||
AppearanceData *data;
|
||||
GtkWidget *win;
|
||||
GnomeProgram *program;
|
||||
GtkWidget *w;
|
||||
|
||||
gchar *install_filename = NULL;
|
||||
gchar *start_page = NULL;
|
||||
GOptionContext *option_context;
|
||||
GOptionEntry option_entries[] = {
|
||||
{ "install-theme",
|
||||
'i',
|
||||
G_OPTION_FLAG_IN_MAIN,
|
||||
G_OPTION_ARG_FILENAME,
|
||||
&install_filename,
|
||||
N_("Specify the filename of a theme to install"),
|
||||
N_("filename")
|
||||
},
|
||||
{ NULL }
|
||||
};
|
||||
{ "install-theme",
|
||||
'i',
|
||||
G_OPTION_FLAG_IN_MAIN,
|
||||
G_OPTION_ARG_FILENAME,
|
||||
&install_filename,
|
||||
N_("Specify the filename of a theme to install"),
|
||||
N_("filename") },
|
||||
{ "show-page",
|
||||
'p',
|
||||
G_OPTION_FLAG_IN_MAIN,
|
||||
G_OPTION_ARG_STRING,
|
||||
&start_page,
|
||||
N_("Specify the name of the page to show"),
|
||||
N_("page") },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
/* init */
|
||||
data = init_appearance_data (&argc, &argv);
|
||||
|
@ -134,13 +142,32 @@ main (int argc, char **argv)
|
|||
ui_init (data);
|
||||
|
||||
/* prepare the main window */
|
||||
win = glade_xml_get_widget (data->xml, "appearance_window");
|
||||
capplet_set_icon (win, "gnome-settings-theme");
|
||||
gtk_widget_show_all (win);
|
||||
w = glade_xml_get_widget (data->xml, "appearance_window");
|
||||
capplet_set_icon (w, "gnome-settings-theme");
|
||||
gtk_widget_show_all (w);
|
||||
|
||||
g_signal_connect_after (G_OBJECT (win), "response",
|
||||
g_signal_connect_after (G_OBJECT (w), "response",
|
||||
G_CALLBACK (main_window_response), data);
|
||||
|
||||
if (start_page != NULL) {
|
||||
gchar *page_name;
|
||||
|
||||
page_name = g_strconcat (start_page, "_vbox", NULL);
|
||||
g_free (start_page);
|
||||
|
||||
w = glade_xml_get_widget (data->xml, page_name);
|
||||
if (w != NULL) {
|
||||
GtkNotebook *nb;
|
||||
gint pindex;
|
||||
|
||||
nb = GTK_NOTEBOOK (glade_xml_get_widget (data->xml, "main_notebook"));
|
||||
pindex = gtk_notebook_page_num (nb, w);
|
||||
if (pindex != -1)
|
||||
gtk_notebook_set_current_page (nb, pindex);
|
||||
}
|
||||
g_free (page_name);
|
||||
}
|
||||
|
||||
/* start the mainloop */
|
||||
gtk_main ();
|
||||
|
||||
|
|
|
@ -615,13 +615,13 @@
|
|||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="spacing">2</property>
|
||||
<child>
|
||||
<widget class="GtkNotebook" id="notebook1">
|
||||
<widget class="GtkNotebook" id="main_notebook">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="border_width">5</property>
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox1">
|
||||
<widget class="GtkVBox" id="theme_vbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="border_width">12</property>
|
||||
|
@ -712,7 +712,7 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox3">
|
||||
<widget class="GtkVBox" id="background_vbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="border_width">12</property>
|
||||
<property name="spacing">6</property>
|
||||
|
@ -975,7 +975,7 @@ Vertical gradient</property>
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox5">
|
||||
<widget class="GtkVBox" id="fonts_vbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="border_width">12</property>
|
||||
<property name="spacing">18</property>
|
||||
|
@ -1358,7 +1358,7 @@ Vertical gradient</property>
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox22">
|
||||
<widget class="GtkVBox" id="interface_vbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="border_width">12</property>
|
||||
<property name="spacing">18</property>
|
||||
|
|
Loading…
Add table
Reference in a new issue