rpms/gnome-media/devel gnome-volume-control-gconf-fixes.patch, NONE, 1.1 gnome-media.spec, 1.114, 1.115
Bastien Nocera (hadess)
fedora-extras-commits at redhat.com
Wed Oct 10 14:39:00 UTC 2007
Author: hadess
Update of /cvs/pkgs/rpms/gnome-media/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5257
Modified Files:
gnome-media.spec
Added Files:
gnome-volume-control-gconf-fixes.patch
Log Message:
* Wed Oct 10 2007 - Bastien Nocera <bnocera at redhat.com> - 2.20.1-4
- Sanitise the default width/height values from GConf before we
use them (#186791)
gnome-volume-control-gconf-fixes.patch:
--- NEW FILE gnome-volume-control-gconf-fixes.patch ---
Index: window.c
===================================================================
--- window.c (revision 3721)
+++ window.c (working copy)
@@ -136,6 +136,8 @@
static void
gnome_volume_control_window_init (GnomeVolumeControlWindow *win)
{
+ int width, height;
+
win->elements = NULL;
win->element_menu = NULL;
win->el = NULL;
@@ -147,10 +149,14 @@
gnome_app_construct (GNOME_APP (win),
"gnome-volume-control", _("Volume Control"));
- /* To set the window according to previous geomtery */
- gtk_window_set_default_size (GTK_WINDOW (win),
- gconf_client_get_int (win->client,PREF_UI_WINDOW_WIDTH, NULL),
- gconf_client_get_int (win->client,PREF_UI_WINDOW_HEIGHT, NULL));
+ /* To set the window according to previous geometry */
+ width = gconf_client_get_int (win->client,PREF_UI_WINDOW_WIDTH, NULL);
+ if (width < 250)
+ width = 250;
+ gconf_client_get_int (win->client,PREF_UI_WINDOW_HEIGHT, NULL);
+ if (height < 100)
+ height = -1;
+ gtk_window_set_default_size (GTK_WINDOW (win), width, height);
}
GtkWidget *
@@ -167,9 +173,8 @@
gint count = 0, i;
gchar *title;
- /* default element to first */
g_return_val_if_fail (elements != NULL, NULL);
- active_element = elements->data;
+ active_element = NULL;
/* window */
win = g_object_new (GNOME_VOLUME_CONTROL_TYPE_WINDOW, NULL);
@@ -199,17 +204,11 @@
gnome_app_set_statusbar (app, bar);
gnome_app_install_appbar_menu_hints (GNOME_APPBAR (bar), menu);
- /* gconf */
- gconf_client_add_dir (win->client, GNOME_VOLUME_CONTROL_KEY_DIR,
- GCONF_CLIENT_PRELOAD_RECURSIVE, NULL);
- gconf_client_notify_add (win->client, GNOME_VOLUME_CONTROL_KEY_DIR,
- cb_gconf, win, NULL, NULL);
-
/* get active element, if any (otherwise we use the default) */
active_el_str = gconf_client_get_string (win->client,
GNOME_VOLUME_CONTROL_KEY_ACTIVE_ELEMENT,
NULL);
- if (active_el_str != NULL) {
+ if (active_el_str != NULL && active_el_str != '\0') {
for (count = 0, item = elements; item != NULL;
item = item->next, count++) {
cur_el_str = g_object_get_data (item->data, "gnome-volume-control-name");
@@ -219,12 +218,31 @@
}
}
g_free (active_el_str);
- if (!item)
+ if (!item) {
count = 0;
+ active_element = elements->data;
+ /* If there's a default but it doesn't match what we have available,
+ * reset the default */
+ gconf_client_set_string (win->client,
+ GNOME_VOLUME_CONTROL_KEY_ACTIVE_ELEMENT,
+ g_object_get_data (G_OBJECT (active_element),
+ "gnome-volume-control-name"),
+ NULL);
+ }
+ /* default element to first */
+ if (!active_element)
+ active_element = elements->data;
} else {
count = 0;
+ active_element = elements->data;
}
+ /* gconf */
+ gconf_client_add_dir (win->client, GNOME_VOLUME_CONTROL_KEY_DIR,
+ GCONF_CLIENT_PRELOAD_RECURSIVE, NULL);
+ gconf_client_notify_add (win->client, GNOME_VOLUME_CONTROL_KEY_DIR,
+ cb_gconf, win, NULL, NULL);
+
/* window title and menu selection */
title = g_strdup_printf (_("Volume Control: %s"),
g_object_get_data (G_OBJECT (active_element),
Index: gnome-media.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-media/devel/gnome-media.spec,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -r1.114 -r1.115
--- gnome-media.spec 5 Oct 2007 17:16:30 -0000 1.114
+++ gnome-media.spec 10 Oct 2007 14:38:27 -0000 1.115
@@ -12,11 +12,13 @@
Summary: GNOME media programs
Name: gnome-media
Version: 2.20.1
-Release: 3%{?dist}
+Release: 4%{?dist}
License: GPLv2+ and GFDL+
Group: Applications/Multimedia
Source: ftp://ftp.gnome.org/pub/GNOME/sources/gnome-media/2.20/gnome-media-%{version}.tar.gz
Patch0: gnome-media-2.13.5-hide-help-button.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=186791
+Patch1: gnome-volume-control-gconf-fixes.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Obsoletes: gnome
@@ -75,6 +77,9 @@
%prep
%setup -q
%patch0 -p1 -b .hide-help-button
+pushd gst-mixer/src
+%patch1 -p0 -b .gconf-fixes
+popd
%build
/usr/bin/gst-inspect-0.10 --print-all > /dev/null
@@ -185,6 +190,10 @@
%{_libdir}/pkgconfig/*
%changelog
+* Wed Oct 10 2007 - Bastien Nocera <bnocera at redhat.com> - 2.20.1-4
+- Sanitise the default width/height values from GConf before we
+ use them (#186791)
+
* Fri Oct 05 2007 - Bastien Nocera <bnocera at redhat.com> - 2.20.1-3
- Add gnome-sound-recorder (#161112)
- Fix CDDBSlave schemas handling
More information about the fedora-extras-commits
mailing list