? sound-capplet.diff
? capplets/sound/sound-properties.gladep
Index: capplets/sound/sound-properties-capplet.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/sound/sound-properties-capplet.c,v
retrieving revision 1.34
diff -u -r1.34 sound-properties-capplet.c
--- capplets/sound/sound-properties-capplet.c	29 May 2002 04:14:18 -0000	1.34
+++ capplets/sound/sound-properties-capplet.c	1 Jul 2002 12:31:46 -0000
@@ -137,6 +137,7 @@
 	GConfChangeSet *changeset;
 	GladeXML       *dialog;
 	GtkWidget      *dialog_win;
+	gchar 	       *window_icon;
 
 	static gboolean apply_only;
 	static gboolean get_legacy;
@@ -171,17 +172,23 @@
 		dialog = create_dialog ();
 		setup_dialog (dialog, changeset);
 
-#if 0
-		gnome_window_icon_set_default_from_file
-			(GNOMECC_ICONS_DIR "sound-capplet.png");
-#endif
+
+	window_icon = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_PIXMAP,
+						 "sound-capplet.png", TRUE, NULL);
+
+	if (window_icon) {
+		gnome_window_icon_set_default_from_file (window_icon);
+		g_free (window_icon);
+	}
+
 
 		dialog_win = gtk_dialog_new_with_buttons
-			(_("Sound preferences"), NULL, -1,
+			(_("Sound Preferences"), NULL, -1,
 			 GTK_STOCK_HELP, GTK_RESPONSE_HELP,
 			 GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
 			 NULL);
 
+		gtk_dialog_set_default_response (GTK_DIALOG (dialog_win), GTK_RESPONSE_CLOSE);
 		g_signal_connect (G_OBJECT (dialog_win), "response", (GCallback) dialog_button_clicked_cb, changeset);
 		gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog_win)->vbox), WID ("prefs_widget"), TRUE, TRUE, GNOME_PAD_SMALL);
 		gtk_widget_show_all (dialog_win);
Index: capplets/sound/sound-properties.glade
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/sound/sound-properties.glade,v
retrieving revision 1.7
diff -u -r1.7 sound-properties.glade
--- capplets/sound/sound-properties.glade	28 Mar 2002 01:10:53 -0000	1.7
+++ capplets/sound/sound-properties.glade	1 Jul 2002 12:31:46 -0000
@@ -1,114 +1,129 @@
 <?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd" >
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
 <glade-interface>
-  <widget class="GtkWindow" id="window1">
-    <property name="title" translatable="yes">window2</property>
-    <property name="type">GTK_WINDOW_TOPLEVEL</property>
-    <property name="modal">no</property>
-    <property name="allow_shrink">no</property>
-    <property name="allow_grow">yes</property>
-    <property name="visible">no</property>
-    <property name="window-position">GTK_WIN_POS_NONE</property>
-
-    <child>
-      <widget class="GtkNotebook" id="prefs_widget">
-        <property name="can_focus">yes</property>
-        <property name="show_tabs">yes</property>
-        <property name="show_border">yes</property>
-        <property name="tab_pos">GTK_POS_TOP</property>
-        <property name="scrollable">no</property>
-        <property name="tab_hborder">2</property>
-        <property name="tab_vborder">2</property>
-        <property name="enable-popup">no</property>
-        <property name="visible">yes</property>
-
-        <child>
-          <widget class="GtkVBox" id="vbox1">
-            <property name="homogeneous">no</property>
-            <property name="spacing">5</property>
-            <property name="visible">yes</property>
-
-            <child>
-              <widget class="GtkCheckButton" id="enable_toggle">
-                <property name="can_focus">yes</property>
-                <property name="label" translatable="yes">E_nable sound server startup</property>
-                <property name="active">no</property>
-                <property name="draw_indicator">yes</property>
-                <property name="visible">yes</property>
-	    	<property name="use_underline">yes</property>
-
-                <signal name="toggled" handler="enable_toggled_cb" />
-              </widget>
-              <packing>
-                <property name="padding">0</property>
-                <property name="expand">no</property>
-                <property name="fill">no</property>
-              </packing>
-            </child>
-
-            <child>
-              <widget class="GtkCheckButton" id="events_toggle">
-                <property name="can_focus">yes</property>
-                <property name="label" translatable="yes">_Sounds for events</property>
-                <property name="active">no</property>
-                <property name="draw_indicator">yes</property>
-                <property name="visible">yes</property>
-	    	<property name="use_underline">yes</property>
-
-                <signal name="toggled" handler="events_toggled_cb" />
-              </widget>
-              <packing>
-                <property name="padding">0</property>
-                <property name="expand">no</property>
-                <property name="fill">no</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-
-        <child>
-          <widget class="GtkLabel" id="label1">
-            <property name="label" translatable="yes">_General</property>
-            <property name="justify">GTK_JUSTIFY_CENTER</property>
-            <property name="wrap">no</property>
-            <property name="xalign">0.5</property>
-            <property name="yalign">0.5</property>
-            <property name="xpad">0</property>
-            <property name="ypad">0</property>
-            <property name="visible">yes</property>
-	    <property name="use_underline">yes</property>
-          </widget>
-          <packing>
-            <property name="type">tab</property>
-          </packing>
-        </child>
-
-        <child>
-          <widget class="GtkVBox" id="events_vbox">
-            <property name="homogeneous">no</property>
-            <property name="spacing">0</property>
-            <property name="visible">yes</property>
-          </widget>
-        </child>
-
-        <child>
-          <widget class="GtkLabel" id="label2">
-            <property name="label" translatable="yes">Sound _Events</property>
-            <property name="justify">GTK_JUSTIFY_CENTER</property>
-            <property name="wrap">no</property>
-            <property name="xalign">0.5</property>
-            <property name="yalign">0.5</property>
-            <property name="xpad">0</property>
-            <property name="ypad">0</property>
-            <property name="visible">yes</property>
-	    <property name="use_underline">yes</property>
-          </widget>
-          <packing>
-            <property name="type">tab</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
+
+<widget class="GtkWindow" id="window1">
+  <property name="title" translatable="yes">window2</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+
+  <child>
+    <widget class="GtkNotebook" id="prefs_widget">
+      <property name="visible">True</property>
+      <property name="can_focus">True</property>
+      <property name="show_tabs">True</property>
+      <property name="show_border">True</property>
+      <property name="tab_pos">GTK_POS_TOP</property>
+      <property name="scrollable">False</property>
+      <property name="tab_hborder">2</property>
+      <property name="tab_vborder">2</property>
+      <property name="enable_popup">False</property>
+
+      <child>
+	<widget class="GtkVBox" id="vbox1">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">5</property>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="enable_toggle">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">E_nable sound server</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="enable_toggled_cb"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="events_toggle">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">_Sounds for events</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="events_toggled_cb"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="tab_expand">False</property>
+	  <property name="tab_fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label1">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">_General</property>
+	  <property name="use_underline">True</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_CENTER</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0.5</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="type">tab</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="events_vbox">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+	</widget>
+	<packing>
+	  <property name="tab_expand">False</property>
+	  <property name="tab_fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label2">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">Sound _Events</property>
+	  <property name="use_underline">True</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_CENTER</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0.5</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="type">tab</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
 </glade-interface>
Index: libsounds/sound-view.c
===================================================================
RCS file: /cvs/gnome/libsounds/libsounds/sound-view.c,v
retrieving revision 1.15
diff -u -r1.15 sound-view.c
--- libsounds/sound-view.c	9 May 2002 17:20:28 -0000	1.15
+++ libsounds/sound-view.c	1 Jul 2002 12:31:46 -0000
@@ -19,6 +19,7 @@
 	GtkTreeSelection *selection;
 	SoundProperties *props;
 	GtkWidget *play_button;
+	GtkWidget *entry_label;
 	GtkWidget *entry;
 	GHashTable *event2path;
 	GSList *paths;
@@ -183,9 +184,7 @@
 	GtkCellRenderer *renderer;
 	GtkTreeViewColumn *column;
 	SoundView *view = SOUND_VIEW (object);
-	GtkWidget *widget, *hbox, *bbox;
-	GtkWidget *vbox;
-	GtkWidget *frame, *label;
+	GtkWidget *widget, *label, *hbox, *bbox;
 	gchar *path;
 
 	view->priv = g_new0 (SoundViewPrivate, 1);
@@ -218,6 +217,7 @@
 							   "text", EVENT_COLUMN,
 							   NULL);
 	gtk_tree_view_column_set_clickable (column, FALSE);
+	gtk_tree_view_column_set_resizable (column, TRUE);
 	gtk_tree_view_append_column (view->priv->view, column);
 
 	column = gtk_tree_view_column_new_with_attributes (_("File to play"),
@@ -225,6 +225,7 @@
 							   "text", FILE_COLUMN,
 							   NULL);
 	gtk_tree_view_column_set_clickable (column, FALSE);
+	gtk_tree_view_column_set_resizable (column, TRUE);
 	gtk_tree_view_append_column (view->priv->view, column);
 
 	widget = gtk_scrolled_window_new (NULL, NULL);
@@ -234,14 +235,13 @@
 	gtk_widget_set_size_request (widget, 350, -1);
 	gtk_container_add (GTK_CONTAINER (widget), GTK_WIDGET (view->priv->view));
 
-	frame = gtk_frame_new ("");
-	label = gtk_label_new_with_mnemonic (_("_Sounds"));
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget);
-	gtk_frame_set_label_widget (GTK_FRAME (frame), label);
-	gtk_container_add (GTK_CONTAINER (frame), widget);
+	hbox = gtk_hbox_new (FALSE, 0);
+	label = gtk_label_new_with_mnemonic (_("_Sounds:"));
+	gtk_label_set_mnemonic_widget (GTK_LABEL (label), GTK_WIDGET (view->priv->view));
+	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, GNOME_PAD_SMALL);
+	gtk_box_pack_start (GTK_BOX (view), hbox, FALSE, FALSE, 0);
+	gtk_box_pack_start (GTK_BOX (view), widget, TRUE, TRUE, 0);
 
-	gtk_box_pack_start (GTK_BOX (view), frame, TRUE, TRUE, 0);
-	gtk_widget_show_all (frame);
 
 	hbox = gtk_hbox_new (FALSE, 0);
 	gtk_box_pack_start (GTK_BOX (view), hbox, FALSE, FALSE, GNOME_PAD);
@@ -250,11 +250,12 @@
 	gtk_box_pack_start (GTK_BOX (bbox), gtk_image_new_from_stock (GNOME_STOCK_VOLUME, GTK_ICON_SIZE_BUTTON), FALSE, FALSE, 0);
 	gtk_box_pack_start (GTK_BOX (bbox), gtk_label_new_with_mnemonic (_("_Play")), FALSE, FALSE, GNOME_PAD);
 	gtk_container_add (GTK_CONTAINER (view->priv->play_button), bbox);
-	gtk_box_pack_start (GTK_BOX (hbox), view->priv->play_button, TRUE, FALSE, GNOME_PAD_SMALL);
 	g_object_set_data (G_OBJECT (view->priv->play_button), "gnome_disable_sound_events", GINT_TO_POINTER(1));
 	g_signal_connect (G_OBJECT (view->priv->play_button), "clicked", (GCallback) play_cb, view);
 
+	view->priv->entry_label = gtk_label_new_with_mnemonic (_("Sound _file:"));
 	view->priv->entry = gnome_file_entry_new (NULL, _("Select sound file"));
+	gtk_label_set_mnemonic_widget (GTK_LABEL (view->priv->entry_label), view->priv->entry);
 	path = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_DATADIR, "sounds/", TRUE, NULL);
 	gnome_file_entry_set_default_path (GNOME_FILE_ENTRY (view->priv->entry), path);
 	g_free (path);
@@ -262,12 +263,13 @@
 	g_signal_connect (G_OBJECT (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (view->priv->entry))), "changed",
 			  (GCallback) entry_changed_cb, view);
 				       
-	vbox = gtk_vbox_new (FALSE, 0);
-	gtk_box_pack_start (GTK_BOX (vbox), view->priv->entry, FALSE, FALSE, 0);
-	gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, FALSE, GNOME_PAD_SMALL);
+	gtk_box_pack_start (GTK_BOX (hbox), view->priv->entry_label, FALSE, FALSE, GNOME_PAD_SMALL);
+	gtk_box_pack_start (GTK_BOX (hbox), view->priv->entry, TRUE, TRUE, 0);
+	gtk_box_pack_end (GTK_BOX (hbox), view->priv->play_button, FALSE, FALSE, GNOME_PAD_SMALL);
 
 
 	gtk_widget_set_sensitive (view->priv->play_button, FALSE);
+	gtk_widget_set_sensitive (view->priv->entry_label, FALSE);
 	gtk_widget_set_sensitive (view->priv->entry, FALSE);
 	
 	gtk_widget_show_all (hbox);
@@ -397,12 +399,13 @@
 		} else {
 			text = g_strdup (text);
 		}
-
 		gtk_widget_set_sensitive (view->priv->play_button, TRUE);
+		gtk_widget_set_sensitive (view->priv->entry_label, TRUE);
 		gtk_widget_set_sensitive (view->priv->entry, TRUE);
 	} else {
 		text = g_strdup ("");
 		gtk_widget_set_sensitive (view->priv->play_button, FALSE);
+		gtk_widget_set_sensitive (view->priv->entry_label, FALSE);
 		gtk_widget_set_sensitive (view->priv->entry, FALSE);
 	}
 
