[Goodies-commits] r5347 - xfce4-smartpm-plugin/trunk/src

Anders F Bjorklund afb at xfce.org
Thu Sep 4 09:38:35 CEST 2008


Author: afb
Date: 2008-09-04 07:38:35 +0000 (Thu, 04 Sep 2008)
New Revision: 5347

Modified:
   xfce4-smartpm-plugin/trunk/src/xfcesmart.c
Log:
upgrading directly only works with smart

Modified: xfce4-smartpm-plugin/trunk/src/xfcesmart.c
===================================================================
--- xfce4-smartpm-plugin/trunk/src/xfcesmart.c	2008-09-03 03:40:15 UTC (rev 5346)
+++ xfce4-smartpm-plugin/trunk/src/xfcesmart.c	2008-09-04 07:38:35 UTC (rev 5347)
@@ -984,6 +984,12 @@
 
   smart_set_manager (smart, manager);
 
+  button = g_object_get_data (G_OBJECT (smart->plugin), "upgrade-directly");
+
+  if (button != NULL)
+  gtk_widget_set_sensitive (button,
+     smart->package_manager == PACKAGE_MANAGER_SMART);
+
   button = g_object_get_data (G_OBJECT (smart->plugin), "dist-upgrade");
 
   if (button != NULL)
@@ -1345,6 +1351,7 @@
     }
   else if (response == GTK_RESPONSE_OK)
     {
+      g_object_set_data (G_OBJECT (smart->plugin), "upgrade-directly", NULL);
       g_object_set_data (G_OBJECT (smart->plugin), "dist-upgrade", NULL);
 
       /* remove the dialog data from the plugin */
@@ -1501,6 +1508,10 @@
   g_signal_connect (G_OBJECT(button),"toggled", G_CALLBACK(smart_checkbox4_toggle_cb), smart);
   gtk_box_pack_start (GTK_BOX(vbox),button,TRUE,TRUE,0);
 
+  g_object_set_data (G_OBJECT (plugin), "upgrade-directly", button);
+  gtk_widget_set_sensitive (button,
+     smart->package_manager == PACKAGE_MANAGER_SMART);
+
   button = gtk_check_button_new_with_label(_("Smart upgrade to newer release (dist-upgrade)"));
   gtk_widget_show (button);
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(button), smart->dist_upgrade);




More information about the Goodies-commits mailing list