diff options
author | Matthias Clasen <mclasen@fedoraproject.org> | 2008-01-06 03:45:53 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@fedoraproject.org> | 2008-01-06 03:45:53 +0000 |
commit | 83cc073c1172bf6e03de55fd527127716379f14a (patch) | |
tree | 5c95d82dac34868706a01e48fbb93eb50f30471b | |
parent | f22b474739d813189b8500690ecb851242f1768f (diff) | |
download | gnome-applets-83cc073c1172bf6e03de55fd527127716379f14a.tar.gz gnome-applets-83cc073c1172bf6e03de55fd527127716379f14a.tar.xz gnome-applets-83cc073c1172bf6e03de55fd527127716379f14a.zip |
remove unused patches
-rw-r--r-- | gnome-applets-2.20.0-mixer-out-of-sync.patch | 308 | ||||
-rw-r--r-- | gweather-pc.patch | 10 | ||||
-rw-r--r-- | mixer-preferences-leak.patch | 12 | ||||
-rw-r--r-- | nl_langinfo.patch | 72 | ||||
-rw-r--r-- | weather-abort.patch | 12 | ||||
-rw-r--r-- | weather-update.patch | 12 |
6 files changed, 0 insertions, 426 deletions
diff --git a/gnome-applets-2.20.0-mixer-out-of-sync.patch b/gnome-applets-2.20.0-mixer-out-of-sync.patch deleted file mode 100644 index 5b6fed7..0000000 --- a/gnome-applets-2.20.0-mixer-out-of-sync.patch +++ /dev/null @@ -1,308 +0,0 @@ -Index: applet.c -=================================================================== ---- applet.c (revision 10461) -+++ applet.c (working copy) -@@ -79,7 +79,12 @@ - PanelAppletOrient orient); - - static void gnome_volume_applet_refresh (GnomeVolumeApplet *applet, -- gboolean force_refresh); -+ gboolean force_refresh, -+ gdouble volume, -+ gint mute); -+ -+static void cb_notify_message (GstBus *bus, GstMessage *message, gpointer data); -+ - static gboolean cb_check (gpointer data); - - static void cb_volume (GtkAdjustment *adj, -@@ -242,6 +247,12 @@ - /* i18n */ - ao = gtk_widget_get_accessible (GTK_WIDGET (applet)); - atk_object_set_name (ao, _("Volume Control")); -+ -+ /* Bus for notifications */ -+ applet->bus = gst_bus_new (); -+ gst_bus_add_signal_watch (applet->bus); -+ g_signal_connect (G_OBJECT (applet->bus), "message::element", -+ (GCallback) cb_notify_message, applet); - } - - /* Parse the list of tracks that are stored in GConf */ -@@ -368,12 +379,33 @@ - return FALSE; - - applet->mixer = g_object_ref (active_element); -+ gst_element_set_bus (GST_ELEMENT (applet->mixer), applet->bus); - applet->tracks = active_tracks; - g_list_foreach (applet->tracks, (GFunc) g_object_ref, NULL); - - return TRUE; - } - -+static void -+gnome_volume_applet_setup_timeout (GnomeVolumeApplet *applet) -+{ -+ gboolean need_timeout = TRUE; -+ need_timeout = ((gst_mixer_get_mixer_flags (GST_MIXER (applet->mixer)) & -+ GST_MIXER_FLAG_AUTO_NOTIFICATIONS) == 0); -+ -+ if (need_timeout) { -+ if (applet->timeout == 0) { -+ applet->timeout = g_timeout_add (100, cb_check, applet); -+ } -+ } -+ else { -+ if (applet->timeout != 0) { -+ g_source_remove (applet->timeout); -+ applet->timeout = 0; -+ } -+ } -+} -+ - gboolean - gnome_volume_applet_setup (GnomeVolumeApplet *applet, - GList *elements) -@@ -435,10 +467,9 @@ - component = panel_applet_get_popup_component (PANEL_APPLET (applet)); - g_signal_connect (component, "ui-event", G_CALLBACK (cb_ui_event), applet); - -- gnome_volume_applet_refresh (applet, TRUE); -- if (res) { -- applet->timeout = g_timeout_add (100, cb_check, applet); -- } -+ gnome_volume_applet_refresh (applet, TRUE, -1, -1); -+ if (res) -+ gnome_volume_applet_setup_timeout (applet); - - if (res) { - /* gconf */ -@@ -479,6 +510,11 @@ - g_list_free (applet->elements); - applet->elements = NULL; - } -+ gst_bus_remove_signal_watch (applet->bus); -+ if (applet->bus) { -+ gst_object_unref (applet->bus); -+ applet->bus = NULL; -+ } - - if (applet->tracks) { - g_list_foreach (applet->tracks, (GFunc) g_object_unref, NULL); -@@ -673,11 +709,11 @@ - component = panel_applet_get_popup_component (PANEL_APPLET (applet)); - bonobo_ui_component_set_prop (component, - "/commands/Mute", -- "state", mute ? "1" : "0", NULL); -+ "state", !mute ? "1" : "0", NULL); - - /* update graphic - this should happen automagically after the next - * idle call, but apparently doesn't for some people... */ -- gnome_volume_applet_refresh (applet, TRUE); -+ gnome_volume_applet_refresh (applet, TRUE, -1, !mute); - } - - /* -@@ -940,7 +976,7 @@ - } - - init_pixbufs (applet); -- gnome_volume_applet_refresh (applet, TRUE); -+ gnome_volume_applet_refresh (applet, TRUE, -1, -1); - } - - static void -@@ -990,15 +1026,23 @@ - { - int range = track->max_volume - track->min_volume; - gdouble scale = ((gdouble) range) / 100; -- int *volumes, n; -+ int *volumes, n, volint; - -- volume *= scale; -- volume += track->min_volume; -+ if (volume == 1.0) { -+ volint = track->max_volume; -+ } else if (volume == 0.0) { -+ volint = track->min_volume; -+ } else { -+ volume *= scale; -+ volume += track->min_volume; -+ volint = lrint (volume); -+ } - - volumes = g_new (gint, track->num_channels); - for (n = 0; n < track->num_channels; n++) -- volumes[n] = lrint (volume); -+ volumes[n] = volint; - gst_mixer_set_volume (mixer, track, volumes); -+ - g_free (volumes); - } - -@@ -1049,6 +1093,8 @@ - - applet->lock = FALSE; - applet->force_next_update = TRUE; -+ -+ gnome_volume_applet_refresh (GNOME_VOLUME_APPLET (data), FALSE, v, -1); - } - - /* -@@ -1059,31 +1105,40 @@ - - static void - gnome_volume_applet_refresh (GnomeVolumeApplet *applet, -- gboolean force_refresh) -+ gboolean force_refresh, -+ gdouble volume, -+ gint mute) - { - BonoboUIComponent *component; - GdkPixbuf *pixbuf; - gint n; -- gdouble volume; -- gboolean mute, did_change; -+ gboolean show_mute, did_change; - gchar *tooltip_str; - GstMixerTrack *first_track; - GString *track_names; - GList *iter; - -+ show_mute = 0; -+ - if (!applet->mixer) { - n = 0; -- mute = FALSE; -+ show_mute = 1; -+ mute = 0; - } else if (!applet->tracks) { - return; - } else { -- /* only first track */ - first_track = g_list_first (applet->tracks)->data; -- volume = gnome_volume_applet_get_volume (applet->mixer, first_track); -- mute = GST_MIXER_TRACK_HAS_FLAG (first_track, -- GST_MIXER_TRACK_MUTE); -- if (volume <= 0) { -- mute = TRUE; -+ -+ if (volume == -1) { -+ /* only first track */ -+ volume = gnome_volume_applet_get_volume (applet->mixer, first_track); -+ } -+ if (mute == -1) { -+ mute = GST_MIXER_TRACK_HAS_FLAG (first_track, -+ GST_MIXER_TRACK_MUTE) ? 1 : 0; -+ } -+ if (volume <= 0 || mute) { -+ show_mute = 1; - n = 0; - } - else { -@@ -1101,7 +1156,7 @@ - applet->force_next_update = FALSE; - - if (did_change) { -- if (mute) { -+ if (show_mute) { - pixbuf = applet->pix[0]; - } else { - pixbuf = applet->pix[n]; -@@ -1125,7 +1180,7 @@ - track_names = g_string_append (track_names, track->label); - } - -- if (mute) { -+ if (show_mute) { - tooltip_str = g_strdup_printf (_("%s: muted"), track_names->str); - } else { - /* Translator comment: I'm not all too sure if this makes sense -@@ -1152,10 +1207,56 @@ - "state", mute ? "1" : "0", NULL); - } - -+static void -+cb_notify_message (GstBus *bus, GstMessage *message, gpointer data) -+{ -+ GnomeVolumeApplet *applet = GNOME_VOLUME_APPLET (data); -+ GstMixerMessageType type; -+ GstMixerTrack *first_track; -+ GstMixerTrack *track = NULL; -+ gint mute; -+ gdouble volume; -+ -+ if (applet->tracks == NULL || -+ GST_MESSAGE_SRC (message) != GST_OBJECT (applet->mixer)) { -+ /* No tracks, or not from our mixer - can't update anything anyway */ -+ return; -+ } -+ -+ volume = mute = -1; -+ -+ first_track = g_list_first (applet->tracks)->data; -+ -+ /* This code only calls refresh if the first_track changes, because the -+ * refresh code only retrieves the current value from that track anyway */ -+ type = gst_mixer_message_get_type (message); -+ if (type == GST_MIXER_MESSAGE_MUTE_TOGGLED) { -+ gboolean muted; -+ gst_mixer_message_parse_mute_toggled (message, &track, &muted); -+ mute = muted ? 1 : 0; -+ } -+ else if (type == GST_MIXER_MESSAGE_VOLUME_CHANGED) { -+ gint n, num_channels, *vols; -+ volume = 0.0; -+ -+ gst_mixer_message_parse_volume_changed (message, &track, &vols, &num_channels); -+ for (n = 0; n < num_channels; n++) -+ volume += vols[n]; -+ volume /= track->num_channels; -+ volume = 100 * volume / (track->max_volume - track->min_volume); -+ } else -+ { -+ return; -+ } -+ -+ if (first_track == track) -+ gnome_volume_applet_refresh (GNOME_VOLUME_APPLET (data), FALSE, volume, mute); -+} -+ - static gboolean - cb_check (gpointer data) - { -- gnome_volume_applet_refresh (GNOME_VOLUME_APPLET (data), FALSE); -+ gnome_volume_applet_refresh (GNOME_VOLUME_APPLET (data), FALSE, -1, -1); - - return TRUE; - } -@@ -1214,6 +1315,8 @@ - /* save */ - gst_object_replace ((GstObject **) &applet->mixer, item->data); - gst_element_set_state (old_element, GST_STATE_NULL); -+ -+ gnome_volume_applet_setup_timeout (applet); - newdevice = TRUE; - } - break; -@@ -1374,7 +1477,7 @@ - GnomeVolumeApplet *applet = GNOME_VOLUME_APPLET (data); - - init_pixbufs (applet); -- gnome_volume_applet_refresh (applet, TRUE); -+ gnome_volume_applet_refresh (applet, TRUE, -1, -1); - } - - /* -Index: applet.h -=================================================================== ---- applet.h (revision 10461) -+++ applet.h (working copy) -@@ -71,6 +71,7 @@ - - /* element */ - GstMixer *mixer; -+ GstBus *bus; - gboolean lock; - gint state; - GList *tracks; diff --git a/gweather-pc.patch b/gweather-pc.patch deleted file mode 100644 index 0f35277..0000000 --- a/gweather-pc.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff -up gnome-applets-2.20.0/libgweather/gweather.pc.in.gweather-pc gnome-applets-2.20.0/libgweather/gweather.pc.in ---- gnome-applets-2.20.0/libgweather/gweather.pc.in.gweather-pc 2007-09-22 01:32:03.000000000 -0400 -+++ gnome-applets-2.20.0/libgweather/gweather.pc.in 2007-09-22 01:32:14.000000000 -0400 -@@ -7,5 +7,5 @@ Name: GWeather - Description: GWeather shared library - Version: @VERSION@ - Requires: gtk+-2.0, gnome-vfs-2.0 --Libs: -L${libdir} -+Libs: -L${libdir} -lgweather - Cflags: -I${includedir} diff --git a/mixer-preferences-leak.patch b/mixer-preferences-leak.patch deleted file mode 100644 index 319c277..0000000 --- a/mixer-preferences-leak.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up gnome-applets-2.20.0/mixer/preferences.c.leak gnome-applets-2.20.0/mixer/preferences.c ---- gnome-applets-2.20.0/mixer/preferences.c.leak 2007-09-27 00:49:39.000000000 -0400 -+++ gnome-applets-2.20.0/mixer/preferences.c 2007-09-27 00:50:50.000000000 -0400 -@@ -445,6 +445,8 @@ cb_track_select (GtkTreeSelection *selec - } - } - } -+ g_list_foreach (lst, (GFunc)gtk_tree_path_free, NULL); -+ g_list_free (lst); - } - - /* add the one just selected and adjust its volume if it's not the only one diff --git a/nl_langinfo.patch b/nl_langinfo.patch deleted file mode 100644 index 0610211..0000000 --- a/nl_langinfo.patch +++ /dev/null @@ -1,72 +0,0 @@ -diff -up gnome-applets-2.20.0/libgweather/gweather-prefs.c.nl_langinfo gnome-applets-2.20.0/libgweather/gweather-prefs.c ---- gnome-applets-2.20.0/libgweather/gweather-prefs.c.nl_langinfo 2007-10-29 12:06:59.000000000 -0400 -+++ gnome-applets-2.20.0/libgweather/gweather-prefs.c 2007-10-29 12:07:42.000000000 -0400 -@@ -12,6 +12,8 @@ - # include <config.h> - #endif - -+#include <langinfo.h> -+ - #include <glib/gi18n-lib.h> - #include <gconf/gconf-client.h> - #include <libgweather/gweather-prefs.h> -@@ -57,7 +59,7 @@ static GConfEnumStringPair distance_unit - static void parse_temp_string (const gchar *gconf_str, GWeatherPrefs *prefs) - { - gint value = 0; --#ifdef _NL_MEASUREMENT_MEASUREMENT -+#ifdef HAVE__NL_MEASUREMENT_MEASUREMENT - char *imperial = NULL; - #endif - -@@ -81,7 +83,7 @@ static void parse_temp_string (const gch - } - } - if (!prefs->temperature_unit || prefs->temperature_unit == TEMP_UNIT_DEFAULT ) { --#ifdef _NL_MEASUREMENT_MEASUREMENT -+#ifdef HAVE__NL_MEASUREMENT_MEASUREMENT - imperial = nl_langinfo(_NL_MEASUREMENT_MEASUREMENT); - if ( imperial && imperial[0] == 2 ) { - /* imperial */ -@@ -95,7 +97,7 @@ static void parse_temp_string (const gch - static void parse_speed_string (const gchar *gconf_str, GWeatherPrefs *prefs) - { - gint value = 0; --#ifdef _NL_MEASUREMENT_MEASUREMENT -+#ifdef HAVE__NL_MEASUREMENT_MEASUREMENT - char *imperial = NULL; - #endif - -@@ -119,7 +121,7 @@ static void parse_speed_string (const gc - } - } - if ( (!prefs->speed_unit) || prefs->speed_unit == SPEED_UNIT_DEFAULT ) { --#ifdef _NL_MEASUREMENT_MEASUREMENT -+#ifdef HAVE__NL_MEASUREMENT_MEASUREMENT - imperial = nl_langinfo(_NL_MEASUREMENT_MEASUREMENT); - if ( imperial && imperial[0] == 2 ) { - /* imperial */ -diff -up gnome-applets-2.20.0/configure.in.nl_langinfo gnome-applets-2.20.0/configure.in ---- gnome-applets-2.20.0/configure.in.nl_langinfo 2007-10-29 12:08:28.000000000 -0400 -+++ gnome-applets-2.20.0/configure.in 2007-10-29 12:09:28.000000000 -0400 -@@ -647,6 +647,20 @@ case $struct_tm_tm_gmtoff in - esac - - dnl *************************************************************************** -+dnl *** _NL_MEASUREMENT_MEASUREMENT is an enum and not a define *** -+dnl *************************************************************************** -+AC_MSG_CHECKING([for _NL_MEASUREMENT_MEASUREMENT]) -+AC_TRY_LINK([#include <langinfo.h>], [ -+char c; -+c = *((unsigned char *) nl_langinfo(_NL_MEASUREMENT_MEASUREMENT)); -+], gtk_ok=yes, gtk_ok=no) -+AC_MSG_RESULT($gtk_ok) -+if test "$gtk_ok" = "yes"; then -+ AC_DEFINE([HAVE__NL_MEASUREMENT_MEASUREMENT], [1], -+ [Define if _NL_MEASUREMENT_MEASUREMENT is available]) -+fi -+ -+dnl *************************************************************************** - dnl *** Honour aclocal flags *** - dnl *************************************************************************** - ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}" diff --git a/weather-abort.patch b/weather-abort.patch deleted file mode 100644 index 1982af0..0000000 --- a/weather-abort.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up gnome-applets-2.20.0/libgweather/weather.c.weather-abort gnome-applets-2.20.0/libgweather/weather.c ---- gnome-applets-2.20.0/libgweather/weather.c.weather-abort 2007-10-29 12:05:50.000000000 -0400 -+++ gnome-applets-2.20.0/libgweather/weather.c 2007-10-29 12:06:09.000000000 -0400 -@@ -560,6 +560,8 @@ void weather_info_abort (WeatherInfo *in - gnome_vfs_async_cancel(info->bom_handle); - info->bom_handle = NULL; - } -+ -+ info->requests_pending = FALSE; - } - - WeatherInfo *weather_info_clone (const WeatherInfo *info) diff --git a/weather-update.patch b/weather-update.patch deleted file mode 100644 index 4b22b39..0000000 --- a/weather-update.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up gnome-applets-2.20.0/libgweather/weather.h.weather-update gnome-applets-2.20.0/libgweather/weather.h ---- gnome-applets-2.20.0/libgweather/weather.h.weather-update 2007-10-29 12:04:33.000000000 -0400 -+++ gnome-applets-2.20.0/libgweather/weather.h 2007-10-29 12:04:41.000000000 -0400 -@@ -121,7 +121,7 @@ WeatherInfo * _weather_info_fill (Weat - WeatherInfoFunc cb, - gpointer data); - #define weather_info_new(location, prefs, cb, data) _weather_info_fill(NULL, (location), (prefs), (cb), (data)) --#define weather_info_update(info, prefs, cb, data) _weather_info_fill((info), NULL, (prefs), (cb), (data)); -+#define weather_info_update(info, prefs, cb, data) _weather_info_fill((info), NULL, (prefs), (cb), (data)) - - void weather_info_abort (WeatherInfo *info); - WeatherInfo * weather_info_clone (const WeatherInfo *info); |