diff options
author | kwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059> | 2005-02-21 04:12:30 +0800 |
---|---|---|
committer | kwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059> | 2005-02-21 04:12:30 +0800 |
commit | b131d773be1001282b90b8eb229c87c908984b97 (patch) | |
tree | cda208af01cb6feda57292c05c91b43e8cf51c01 /audio/gnomemedia2 | |
parent | ac4cb2bcac46bf84457e8485bbce5f3ba9e50d4a (diff) | |
download | marcuscom-ports-b131d773be1001282b90b8eb229c87c908984b97.tar marcuscom-ports-b131d773be1001282b90b8eb229c87c908984b97.tar.gz marcuscom-ports-b131d773be1001282b90b8eb229c87c908984b97.tar.bz2 marcuscom-ports-b131d773be1001282b90b8eb229c87c908984b97.tar.lz marcuscom-ports-b131d773be1001282b90b8eb229c87c908984b97.tar.xz marcuscom-ports-b131d773be1001282b90b8eb229c87c908984b97.tar.zst marcuscom-ports-b131d773be1001282b90b8eb229c87c908984b97.zip |
fix 2 bug in gnome-audio-profiles-properties that caused it to core-dump, and
corrupt the audio-profiles in gconf.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@3684 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'audio/gnomemedia2')
-rw-r--r-- | audio/gnomemedia2/Makefile | 1 | ||||
-rw-r--r-- | audio/gnomemedia2/files/patch-profiles_audio-profile.c | 10 | ||||
-rw-r--r-- | audio/gnomemedia2/files/patch-profiles_gnome-audio-profiles-properties.c | 76 |
3 files changed, 87 insertions, 0 deletions
diff --git a/audio/gnomemedia2/Makefile b/audio/gnomemedia2/Makefile index 8bf6b9c34..c14d60db9 100644 --- a/audio/gnomemedia2/Makefile +++ b/audio/gnomemedia2/Makefile @@ -7,6 +7,7 @@ PORTNAME= gnomemedia2 PORTVERSION= 2.9.90 +PORTREVISION= 1 CATEGORIES= audio gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/gnome-media/2.9 diff --git a/audio/gnomemedia2/files/patch-profiles_audio-profile.c b/audio/gnomemedia2/files/patch-profiles_audio-profile.c new file mode 100644 index 000000000..1b12ce758 --- /dev/null +++ b/audio/gnomemedia2/files/patch-profiles_audio-profile.c @@ -0,0 +1,10 @@ +--- profiles/audio-profile.c.orig Tue Feb 15 00:23:13 2005 ++++ profiles/audio-profile.c Tue Feb 15 00:23:31 2005 +@@ -978,7 +978,6 @@ + } + g_free (profile_id); + profile_id = s; +- g_free (s); + + profile_dir = gconf_concat_dir_and_key (CONF_PROFILES_PREFIX, + profile_id); diff --git a/audio/gnomemedia2/files/patch-profiles_gnome-audio-profiles-properties.c b/audio/gnomemedia2/files/patch-profiles_gnome-audio-profiles-properties.c new file mode 100644 index 000000000..c0903ed5e --- /dev/null +++ b/audio/gnomemedia2/files/patch-profiles_gnome-audio-profiles-properties.c @@ -0,0 +1,76 @@ +--- profiles/gnome-audio-profiles-properties.c.orig Mon Sep 20 20:51:20 2004 ++++ profiles/gnome-audio-profiles-properties.c Fri Feb 11 23:40:04 2005 +@@ -21,6 +21,9 @@ + + #include <gtk/gtkmain.h> + #include "gnome-media-profiles.h" ++#include <glade/glade.h> ++#include <glade/glade-build.h> ++#include <string.h> + + static void + on_dialog_destroy (GtkWidget *dialog, gpointer *user_data) +@@ -29,6 +32,52 @@ + gtk_main_quit (); + } + ++static void ++gtk_dialog_build_children(GladeXML *self, GtkWidget *w, ++ GladeWidgetInfo *info) ++ ++{ ++ GtkDialog *dialog = GTK_DIALOG (w); ++ GList *children, *list; ++ ++ glade_standard_build_children (self, w, info); ++ ++ if (dialog->action_area == NULL) ++ return; ++ ++ /* repack children of action_area */ ++ children = gtk_container_get_children(GTK_CONTAINER(dialog->action_area)); ++ for (list = children; list; list = list->next) { ++ GtkWidget *child = GTK_WIDGET(list->data); ++ ++ g_object_ref(child); ++ gtk_container_remove (GTK_CONTAINER (dialog->action_area), child); ++ } ++ for (list = children; list; list = list->next) { ++ GtkWidget *child = GTK_WIDGET(list->data); ++ gint response_id; ++ ++ response_id = GPOINTER_TO_INT(g_object_steal_data(G_OBJECT(child), ++ "response_id")); ++ gtk_dialog_add_action_widget(dialog, child, response_id); ++ g_object_unref(child); ++ ++ } ++ g_list_free (children); ++} ++ ++static GtkWidget * ++dialog_find_internal_child(GladeXML *xml, GtkWidget *parent, ++ const gchar *childname) ++{ ++ if (!strcmp(childname, "vbox")) ++ return GTK_DIALOG(parent)->vbox; ++ if (!strcmp(childname, "action_area")) ++ return GTK_DIALOG(parent)->action_area; ++ ++ return NULL; ++} ++ + int + main (int argc, char *argv[]) + { +@@ -39,6 +88,10 @@ + /* FIXME: add a comment why we need this at all, until then + we comment it out + gm_audio_profile_edit_get_type (); */ ++ glade_register_widget (gm_audio_profile_edit_get_type (), ++ NULL, ++ gtk_dialog_build_children, ++ dialog_find_internal_child); + conf = gconf_client_get_default (); + gnome_media_profiles_init (conf); + |