Re: Patch for gnome-media (gmix)
- From: Gaute Lindkvist <lindkvis stud ntnu no>
- To: <desktop-devel-list gnome org>
- Subject: Re: Patch for gnome-media (gmix)
- Date: Sat, 30 Mar 2002 17:58:54 +0100 (CET)
DOOH!!
Here it is.
Index: gmix/prefs.c
===================================================================
RCS file: /cvs/gnome/gnome-media/gmix/prefs.c,v
retrieving revision 1.7
diff -u -r1.7 prefs.c
--- gmix/prefs.c 21 Mar 2002 02:33:59 -0000 1.7
+++ gmix/prefs.c 30 Mar 2002 16:40:59 -0000
@@ -62,78 +62,8 @@
gconf_client_set_bool (client, "/apps/gnome-volume-control/init-on-start",
gtk_toggle_button_get_active (tb), NULL);
}
-
-static void
-show_icons_toggled (GtkToggleButton *tb,
- gpointer data)
-{
- gconf_client_set_bool (client, "/apps/gnome-volume-control/show-icons",
- gtk_toggle_button_get_active (tb), NULL);
-}
-
-static void
-show_labels_toggled (GtkToggleButton *tb,
- gpointer data)
-{
- gconf_client_set_bool (client, "/apps/gnome-volume-control/show-labels",
- gtk_toggle_button_get_active (tb), NULL);
-}
-static GtkWidget *general_page(void)
-{
- GtkWidget *start_frame, *gui_frame;
- GtkWidget *ubervbox;
- GtkWidget *vbox, *init_start, *menu_hide, *temp;
-
- ubervbox = gtk_vbox_new (FALSE, 0);
-
- start_frame = gtk_frame_new(_("On startup"));
- gtk_container_border_width(GTK_CONTAINER(start_frame), GNOME_PAD_SMALL);
-
- vbox = gtk_vbox_new(TRUE, 0);
-
- /* Set on start */
- init_start = gtk_check_button_new_with_label(_("Restore saved mixer levels on startup"));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (init_start),
- prefs.set_mixer_on_start);
- gtk_signal_connect(GTK_OBJECT(init_start), "toggled",
- GTK_SIGNAL_FUNC(restore_toggled), NULL);
-
- gtk_box_pack_start_defaults(GTK_BOX(vbox), init_start);
- gtk_widget_show_all(vbox);
-
-
- gtk_container_add (GTK_CONTAINER(start_frame), vbox);
- gtk_box_pack_start (GTK_BOX (ubervbox), start_frame, FALSE, FALSE, 0);
-
- gui_frame = gtk_frame_new(_("GUI"));
- gtk_container_border_width(GTK_CONTAINER(gui_frame), GNOME_PAD_SMALL);
-
- vbox = gtk_vbox_new(TRUE, 0);
- temp = gtk_check_button_new_with_label(_("Show mixer icons"));
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(temp),
- prefs.show_icons);
- gtk_signal_connect(GTK_OBJECT(temp), "toggled",
- GTK_SIGNAL_FUNC(show_icons_toggled), NULL);
- gtk_box_pack_start_defaults(GTK_BOX(vbox), temp);
-
-
- temp = gtk_check_button_new_with_label(_("Show mixer labels"));
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(temp),
- prefs.show_labels);
- gtk_signal_connect(GTK_OBJECT(temp), "toggled",
- GTK_SIGNAL_FUNC(show_labels_toggled), NULL);
- gtk_box_pack_start_defaults(GTK_BOX(vbox), temp);
-
-
- gtk_container_add(GTK_CONTAINER(gui_frame), vbox);
-
- gtk_box_pack_start (GTK_BOX (ubervbox), gui_frame, FALSE, FALSE, 0);
-
- gtk_widget_show_all(ubervbox);
- return ubervbox;
-}
/******************** Label Name Page ********************/
@@ -296,7 +226,7 @@
*/
static GtkWidget *labels_create_page(void)
{
- GtkWidget *notebook;
+ GtkWidget *notebook;
notebook = gtk_notebook_new();
gtk_container_set_border_width(GTK_CONTAINER(notebook), 5);
@@ -328,7 +258,7 @@
void
prefs_make_window (GtkWidget *toplevel)
{
- GtkWidget *label, *page, *notebook;
+ GtkWidget *label, *page, *frame;
if (configwin != NULL) {
gdk_window_show (configwin->window);
@@ -339,6 +269,8 @@
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_CLOSE,
GTK_RESPONSE_CLOSE, NULL);
+ /* FIXME: better way of setting initial size? */
+ gtk_window_set_default_size (GTK_WINDOW (configwin), 100, 300);
g_signal_connect (G_OBJECT (configwin), "response",
G_CALLBACK (prefs_response_cb), NULL);
g_signal_connect (G_OBJECT (configwin), "destroy",
@@ -346,16 +278,15 @@
g_signal_connect (G_OBJECT (configwin), "destroy",
G_CALLBACK (gtk_widget_destroyed), &configwin);
- notebook = gtk_notebook_new ();
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (configwin)->vbox), notebook, TRUE, TRUE, 0);
+ frame = gtk_frame_new (NULL);
+
+ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (configwin)->vbox), frame, TRUE, TRUE, 0);
- label = gtk_label_new (_("Preferences"));
- page = general_page ();
- gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page, label);
label = gtk_label_new (_("Labels"));
page = labels_create_page ();
- gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page, label);
+ gtk_frame_set_label_widget (GTK_FRAME (frame), label);
+ gtk_container_add (GTK_CONTAINER (frame), page);
gtk_widget_show_all (configwin);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]