Hello community, here is the log from the commit of package opensuse-updater-gnome checked in at Tue Apr 10 10:16:01 CEST 2007. -------- --- GNOME/opensuse-updater-gnome/opensuse-updater-gnome.changes 2007-04-09 16:57:24.000000000 +0200 +++ /mounts/work_src_done/STABLE/opensuse-updater-gnome/opensuse-updater-gnome.changes 2007-04-09 20:35:54.000000000 +0200 @@ -1,0 +2,7 @@ +Mon Apr 9 20:31:42 CEST 2007 - jkupec@suse.cz + +- fixed some memory management problems +- r5313 +- v 0.2.1 + +------------------------------------------------------------------- Old: ---- opensuse-updater-gnome-0.2.0.tar.bz2 New: ---- opensuse-updater-gnome-0.2.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ opensuse-updater-gnome.spec ++++++ --- /var/tmp/diff_new_pack.ii3818/_old 2007-04-10 10:15:54.000000000 +0200 +++ /var/tmp/diff_new_pack.ii3818/_new 2007-04-10 10:15:54.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package opensuse-updater-gnome (Version 0.2.0) +# spec file for package opensuse-updater-gnome (Version 0.2.1) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -16,12 +16,12 @@ License: GNU General Public License (GPL) Group: System/Packages Summary: GNOME updater applet for OpenSUSE -Version: 0.2.0 +Version: 0.2.1 Release: 1 URL: http://en.opensuse.org/GNOME_Updater_Applet BuildRoot: %{_tmppath}/%{name}-%{version}-build Prefix: /usr -Source0: opensuse-updater-gnome-0.2.0.tar.bz2 +Source0: opensuse-updater-gnome-0.2.1.tar.bz2 Requires: zypper >= 0.5.3 Requires: libglade2 libgnome gnome-panel libgnomesu @@ -117,6 +117,10 @@ %changelog * Mon Apr 09 2007 - jkupec@suse.cz +- fixed some memory management problems +- r5313 +- v 0.2.1 +* Mon Apr 09 2007 - jkupec@suse.cz - changing applet icon according to current operation/status (except error status) - r5312 ++++++ opensuse-updater-gnome-0.2.0.tar.bz2 -> opensuse-updater-gnome-0.2.1.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/opensuse-updater-gnome-0.2.0/package/opensuse-updater-gnome.changes new/opensuse-updater-gnome-0.2.1/package/opensuse-updater-gnome.changes --- old/opensuse-updater-gnome-0.2.0/package/opensuse-updater-gnome.changes 2007-04-09 16:57:24.000000000 +0200 +++ new/opensuse-updater-gnome-0.2.1/package/opensuse-updater-gnome.changes 2007-04-09 20:35:53.000000000 +0200 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Mon Apr 9 20:31:42 CEST 2007 - jkupec@suse.cz + +- fixed some memory management problems +- r5313 +- v 0.2.1 + +------------------------------------------------------------------- Mon Apr 9 16:40:43 CEST 2007 - jkupec@suse.cz - changing applet icon according to current operation/status diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/opensuse-updater-gnome-0.2.0/src/updater-backend.c new/opensuse-updater-gnome-0.2.1/src/updater-backend.c --- old/opensuse-updater-gnome-0.2.0/src/updater-backend.c 2007-04-09 16:57:24.000000000 +0200 +++ new/opensuse-updater-gnome-0.2.1/src/updater-backend.c 2007-04-09 20:35:53.000000000 +0200 @@ -27,23 +27,28 @@ g_free(backend->poutbuf); if (backend->perrbuf) g_free(backend->perrbuf); - - if (backend->update_list) - { - UpdateItem *item; - guint i; - - g_print("going to destroy update list... "); - for (i = 0; i < backend->update_list->len; i++) - update_item_free(g_ptr_array_index(backend->update_list, i)); + backend_free_update_list(backend); - g_print("DONE\n"); + g_free(backend); +} - g_ptr_array_free(backend->update_list, TRUE); - } +void backend_free_update_list(UpdaterBackend *backend) +{ + UpdateItem *item; + guint i; - g_free(backend); + if (!backend->update_list) return; // nothing to free + + g_print("going to destroy update list... "); + + for (i = 0; i < backend->update_list->len; i++) + update_item_free(g_ptr_array_index(backend->update_list, i)); + + g_print("DONE\n"); + + g_ptr_array_free(backend->update_list, TRUE); + backend->update_list = NULL; } GPid backend_check_updates_start(UpdaterBackend *backend) @@ -104,8 +109,14 @@ g_print ("calling out2update_list()...\n"); + // parse backend output and populate update list backend_check_updates_out2update_list(updater->backend); - + + // free stdout buffer + g_free(updater->backend->poutbuf); + updater->backend->poutbuf = NULL; + updater->backend->poutlen = 0; + // adjust UI updater_ui_populate_update_list(updater); updater_ui_set_for_active_operation(updater, FALSE); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/opensuse-updater-gnome-0.2.0/src/updater-backend.h new/opensuse-updater-gnome-0.2.1/src/updater-backend.h --- old/opensuse-updater-gnome-0.2.0/src/updater-backend.h 2007-04-09 16:57:24.000000000 +0200 +++ new/opensuse-updater-gnome-0.2.1/src/updater-backend.h 2007-04-09 20:35:53.000000000 +0200 @@ -47,6 +47,11 @@ void backend_destroy(UpdaterBackend *backend); +/** + * Frees the \ref update_list (if not <tt>NULL</tt>) and sets it to <tt>NULL</tt>. + */ +void backend_free_update_list(UpdaterBackend *backend); + GPid backend_check_updates_start(UpdaterBackend *backend); void backend_check_updates_out2update_list(UpdaterBackend *backend); GPid backend_install_start(UpdaterBackend *backend); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/opensuse-updater-gnome-0.2.0/src/updater-callbacks.c new/opensuse-updater-gnome-0.2.1/src/updater-callbacks.c --- old/opensuse-updater-gnome-0.2.0/src/updater-callbacks.c 2007-04-09 16:57:24.000000000 +0200 +++ new/opensuse-updater-gnome-0.2.1/src/updater-callbacks.c 2007-04-09 20:35:53.000000000 +0200 @@ -78,7 +78,10 @@ { SUSEUpdater *updater = user_data; if (updater->applet) + { gtk_widget_hide(updater->main_window); + updater->main_win_shown = FALSE; + } else gtk_widget_destroy(updater->main_window); } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/opensuse-updater-gnome-0.2.0/src/updater-callbacks.h new/opensuse-updater-gnome-0.2.1/src/updater-callbacks.h --- old/opensuse-updater-gnome-0.2.0/src/updater-callbacks.h 2007-04-09 16:57:24.000000000 +0200 +++ new/opensuse-updater-gnome-0.2.1/src/updater-callbacks.h 2007-04-09 20:35:53.000000000 +0200 @@ -17,6 +17,11 @@ void on_EditSourcesButton_clicked (GtkWidget *widget, gpointer user_data); void on_InstallButton_clicked (GtkWidget *widget, gpointer user_data); + +/** + * Hides the main window, if run as applet, destroys the main window, if + * run as a standalone app. + */ void on_CancelButton_clicked (GtkWidget *widget, gpointer user_data); #endif /*UPDATERCALLBACKS_H_*/ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/opensuse-updater-gnome-0.2.0/src/zypp/updater-zypp.c new/opensuse-updater-gnome-0.2.1/src/zypp/updater-zypp.c --- old/opensuse-updater-gnome-0.2.0/src/zypp/updater-zypp.c 2007-04-09 16:57:24.000000000 +0200 +++ new/opensuse-updater-gnome-0.2.1/src/zypp/updater-zypp.c 2007-04-09 20:35:53.000000000 +0200 @@ -76,8 +76,13 @@ xmlChar *name, *edition; cur = cur->xmlChildrenNode; + // free previous update list + backend_free_update_list(backend); + + // allocate new memory + backend->update_list = g_ptr_array_sized_new(100 /* TODO */); + backend->updates_count = 0; - backend->update_list = g_ptr_array_sized_new(100); while (cur != NULL) { diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/opensuse-updater-gnome-0.2.0/VERSION.cmake new/opensuse-updater-gnome-0.2.1/VERSION.cmake --- old/opensuse-updater-gnome-0.2.0/VERSION.cmake 2007-04-09 16:57:24.000000000 +0200 +++ new/opensuse-updater-gnome-0.2.1/VERSION.cmake 2007-04-09 20:35:53.000000000 +0200 @@ -20,5 +20,5 @@ SET(VERSION_MAJOR "0") SET(VERSION_MINOR "2") -SET(VERSION_PATCH "0") +SET(VERSION_PATCH "1") ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org