Mailinglist Archive: zypp-commit (325 mails)

< Previous Next >
[zypp-commit] r7073 - in /trunk/updater-gnome/src: updater-applet-callbacks.c updater-applet.c updater-backend.c updater.c zypp/updater-zypp.c
  • From: joshkress@xxxxxxxxxxxxxxxx
  • Date: Mon, 03 Sep 2007 09:07:36 -0000
  • Message-id: <20070903090736.F2CF424F98@xxxxxxxxxxxxxxxx>
Author: joshkress
Date: Mon Sep  3 11:07:36 2007
New Revision: 7073

URL: http://svn.opensuse.org/viewcvs/zypp?rev=7073&view=rev
Log:
- fixed bug #300461: No more SIGABRT on quitting
- fixed all Gtk-CRITICAL messages on quitting
- fixed all GLib-critical messages on quitting
- removed all g_prints connected to these problems

Modified:
    trunk/updater-gnome/src/updater-applet-callbacks.c
    trunk/updater-gnome/src/updater-applet.c
    trunk/updater-gnome/src/updater-backend.c
    trunk/updater-gnome/src/updater.c
    trunk/updater-gnome/src/zypp/updater-zypp.c

Modified: trunk/updater-gnome/src/updater-applet-callbacks.c
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/updater-gnome/src/updater-applet-callbacks.c?rev=7073&r1=7072&r2=7073&view=diff
==============================================================================
--- trunk/updater-gnome/src/updater-applet-callbacks.c (original)
+++ trunk/updater-gnome/src/updater-applet-callbacks.c Mon Sep  3 11:07:36 2007
@@ -57,8 +57,8 @@
 
   // TODO add debug message
   // TODO properly destroy
-
-  updater_destroy(applet->updater);
+  if (applet->updater)
+    updater_destroy(applet->updater);
 
   return TRUE;
 }
@@ -171,9 +171,11 @@
                  guint      action,
                  GtkWidget *widget)
 {
-  // UpdaterApplet *applet = (UpdaterApplet *) callback_data;
-  // updater_destroy(applet->updater);
-  g_printf("We are now calling gtk_main_quit from the callback function.\n");
+  // g_print ("We're now in the applet_quit callback.\n");
+  UpdaterApplet *applet = (UpdaterApplet *) callback_data;
+  // g_print ("applet_quit: calling updater_destroy!\n");
+  updater_destroy(applet->updater);
+  // g_print ("applet_quit: calling gtk_main_quit!\n");
   gtk_main_quit ();
 }
 

Modified: trunk/updater-gnome/src/updater-applet.c
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/updater-gnome/src/updater-applet.c?rev=7073&r1=7072&r2=7073&view=diff
==============================================================================
--- trunk/updater-gnome/src/updater-applet.c (original)
+++ trunk/updater-gnome/src/updater-applet.c Mon Sep  3 11:07:36 2007
@@ -207,7 +207,9 @@
 static void
 destroy_applet (UpdaterApplet *applet)
 {
-  updater_destroy (applet->updater);
+  // g_print ("updater-applet.c: destroy applet!\n");
+  // if (applet->updater)
+  //   updater_destroy (applet->updater);
 
   g_free (applet);
 }
@@ -275,7 +277,7 @@
   applet = create_applet ();
 
   gtk_main ();
-  g_printf("updater-applet-main: Did we get here?\n");
+  // g_printf("updater-applet-main: Did we get here?\n");
   destroy_applet (applet);
 
   return 0;

Modified: trunk/updater-gnome/src/updater-backend.c
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/updater-gnome/src/updater-backend.c?rev=7073&r1=7072&r2=7073&view=diff
==============================================================================
--- trunk/updater-gnome/src/updater-backend.c (original)
+++ trunk/updater-gnome/src/updater-backend.c Mon Sep  3 11:07:36 2007
@@ -20,7 +20,7 @@
 
 void backend_destroy(UpdaterBackend *backend)
 {
-  zypp_backend_destroy(backend);
+  // zypp_backend_destroy(backend);
   // (*(backend->destroy)) (backend);
 
   if (backend->poutbuf)
@@ -29,7 +29,29 @@
     g_free(backend->perrbuf);
 
   backend_free_update_list(backend);
-
+  
+  /* Freeing the update list strings */
+  if (backend->updates_list_security)
+    g_string_free(backend->updates_list_security, TRUE);
+    
+  if (backend->updates_list_security_needrestart)
+    g_string_free(backend->updates_list_security_needrestart, TRUE);
+    
+  if (backend->updates_list_recommended_patches)
+    g_string_free(backend->updates_list_recommended_patches, TRUE);
+    
+  if (backend->updates_list_recommended_patches_needrestart)
+    g_string_free(backend->updates_list_recommended_patches_needrestart, TRUE);
+    
+  if (backend->updates_list_optional_patches)
+    g_string_free(backend->updates_list_optional_patches, TRUE);
+    
+  if (backend->updates_list_optional_patches_needrestart)
+    g_string_free(backend->updates_list_optional_patches_needrestart, TRUE);
+    
+  if (backend->updates_list_third_party_packages)
+    g_string_free(backend->updates_list_third_party_packages, TRUE);
+  
   g_free(backend);
 }
 

Modified: trunk/updater-gnome/src/updater.c
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/updater-gnome/src/updater.c?rev=7073&r1=7072&r2=7073&view=diff
==============================================================================
--- trunk/updater-gnome/src/updater.c (original)
+++ trunk/updater-gnome/src/updater.c Mon Sep  3 11:07:36 2007
@@ -76,16 +76,32 @@
 
 void updater_destroy(SUSEUpdater *updater)
 {
+  // g_print ("We're in updater_destroy now.\n");
   if (updater)
   {
+    // g_print ("We have an updater object. Destroying now.\n");
     if (updater->main_window)
+    {
+      // g_print ("Destroying main window.\n");
       gtk_widget_destroy (updater->main_window);
+    }
     if (updater->simple_window)
+    {
+      // g_print ("Destroying simple window.\n");
       gtk_widget_destroy (updater->simple_window);
+    }
     if (updater->backend)
+    {
+      // g_print ("Destroying backend.\n");
       backend_destroy (updater->backend);
+    }
     if (updater->preferences_window)
+    {
+      // g_print ("Destroying preferces window.\n");
       gtk_widget_destroy (updater->preferences_window);
+    }
+    if (updater->update_timer)
+      g_timer_destroy (updater->update_timer);
 
     g_free(updater);
   }

Modified: trunk/updater-gnome/src/zypp/updater-zypp.c
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/updater-gnome/src/zypp/updater-zypp.c?rev=7073&r1=7072&r2=7073&view=diff
==============================================================================
--- trunk/updater-gnome/src/zypp/updater-zypp.c (original)
+++ trunk/updater-gnome/src/zypp/updater-zypp.c Mon Sep  3 11:07:36 2007
@@ -291,8 +291,6 @@
 GPid zypp_install_start(UpdaterBackend *backend)
 {
   GPid        pid;
-  GString     *zypper_cmd_patches;
-  GString     *zypper_cmd_packages;
   GString     *zypper_gui_cmd = g_string_new("/usr/sbin/updater-zypper-gui ");
   GError      *error = NULL;
   gchar       *tmp;
@@ -469,6 +467,7 @@
   if (!gnomesu_spawn_command_async("root", install_argv, &pid))
     return 0;
   
+  g_string_free(zypper_gui_cmd, TRUE);
   g_free(install_argv);
   return pid;
 }

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages