[gnome-panel/wip/3.0-freeze-break: 5/32] panel: Drop migration code for screenshot action buttons (pre-2.14 days)



commit a2b36b64489252ac6b21dff1060c5524632d0f13
Author: Vincent Untz <vuntz gnome org>
Date:   Wed Mar 23 10:46:16 2011 +0100

    panel: Drop migration code for screenshot action buttons (pre-2.14 days)
    
    Same rationale as previous commits.

 gnome-panel/panel-action-button.c |   20 +++-----------------
 gnome-panel/panel-compatibility.c |   21 ---------------------
 gnome-panel/panel-compatibility.h |    2 --
 gnome-panel/panel-enums.h         |    3 +--
 4 files changed, 4 insertions(+), 42 deletions(-)
---
diff --git a/gnome-panel/panel-action-button.c b/gnome-panel/panel-action-button.c
index 2ee9b6f..b614a2b 100644
--- a/gnome-panel/panel-action-button.c
+++ b/gnome-panel/panel-action-button.c
@@ -49,7 +49,6 @@
 #include "panel-run-dialog.h"
 #include "panel-a11y.h"
 #include "panel-lockdown.h"
-#include "panel-compatibility.h"
 #include "panel-icon-names.h"
 
 G_DEFINE_TYPE (PanelActionButton, panel_action_button, BUTTON_TYPE_WIDGET)
@@ -82,8 +81,6 @@ static GConfEnumStringPair panel_action_type_map [] = {
 	{ PANEL_ACTION_FORCE_QUIT,     "force-quit"     },
 	{ PANEL_ACTION_CONNECT_SERVER, "connect-server" },
 	{ PANEL_ACTION_SHUTDOWN,       "shutdown"       },
-	/* compatibility with GNOME < 2.13.90 */
-	{ PANEL_ACTION_SCREENSHOT,     "screenshot"     },
 	{ 0,                           NULL             },
 };
 
@@ -361,12 +358,6 @@ static PanelAction actions [] = {
 		"ACTION:shutdown:NEW",
 		panel_action_shutdown, NULL, NULL,
 		panel_action_shutdown_reboot_is_disabled
-	},
-	/* deprecated actions */
-	{
-		PANEL_ACTION_SCREENSHOT,
-		NULL, NULL, NULL, NULL,
-		NULL, NULL, NULL, NULL
 	}
 };
 
@@ -375,7 +366,7 @@ panel_action_get_is_deprecated (PanelActionButtonType type)
 {
 	g_return_val_if_fail (type > PANEL_ACTION_NONE && type < PANEL_ACTION_LAST, FALSE);
 
-	return (type >= PANEL_ACTION_SCREENSHOT);
+	return (type > PANEL_ACTION_LAST_NON_DEPRECATED);
 }
 
 gboolean
@@ -785,13 +776,8 @@ panel_action_button_load_from_gconf (PanelWidget *panel,
 
 	g_free (action_type);
 
-	/* compatibility: migrate from GNOME < 2.13.90 */
-	if (type == PANEL_ACTION_SCREENSHOT)
-		panel_compatibility_migrate_screenshot_action (panel_gconf_get_client (),
-							       id);
-	else
-		panel_action_button_load (type, panel, locked,
-					  position, exactpos, id, FALSE);
+	panel_action_button_load (type, panel, locked,
+				  position, exactpos, id, FALSE);
 }
 
 void
diff --git a/gnome-panel/panel-compatibility.c b/gnome-panel/panel-compatibility.c
index 7b019c2..fee2ec0 100644
--- a/gnome-panel/panel-compatibility.c
+++ b/gnome-panel/panel-compatibility.c
@@ -35,27 +35,6 @@
 #include "panel-util.h"
 
 void
-panel_compatibility_migrate_screenshot_action (GConfClient *client,
-					      const char  *id)
-{
-	const char *key;
-
-	panel_profile_remove_from_list (PANEL_GCONF_OBJECTS, id);
-
-	key = panel_gconf_full_key (PANEL_GCONF_OBJECTS, id,
-				    "launcher_location");
-	gconf_client_set_string (client, key, "gnome-screenshot.desktop", NULL);
-
-	key = panel_gconf_full_key (PANEL_GCONF_OBJECTS, id,
-				    "object_type");
-	//FIXME: ideally, we would use panel_object_type_map, but it's private
-	//in panel-profile.c
-	gconf_client_set_string (client, key, "launcher-object", NULL);
-
-	panel_profile_add_to_list (PANEL_GCONF_OBJECTS, id);
-}
-
-void
 panel_compatiblity_migrate_settings_menu_button (GConfClient *client,
 						 const char  *id)
 {
diff --git a/gnome-panel/panel-compatibility.h b/gnome-panel/panel-compatibility.h
index 7a8796d..8f3f213 100644
--- a/gnome-panel/panel-compatibility.h
+++ b/gnome-panel/panel-compatibility.h
@@ -30,8 +30,6 @@
 
 G_BEGIN_DECLS
 
-void panel_compatibility_migrate_screenshot_action (GConfClient *client,
-						   const char  *id);
 void panel_compatiblity_migrate_settings_menu_button (GConfClient *client,
 						      const char  *id);
 
diff --git a/gnome-panel/panel-enums.h b/gnome-panel/panel-enums.h
index 296f663..9d36572 100644
--- a/gnome-panel/panel-enums.h
+++ b/gnome-panel/panel-enums.h
@@ -95,8 +95,7 @@ typedef enum {
 	PANEL_ACTION_FORCE_QUIT,
 	PANEL_ACTION_CONNECT_SERVER,
 	PANEL_ACTION_SHUTDOWN,
-	/* compatibility with GNOME < 2.13.90 */
-        PANEL_ACTION_SCREENSHOT,
+#define PANEL_ACTION_LAST_NON_DEPRECATED PANEL_ACTION_SHUTDOWN
         PANEL_ACTION_LAST
 } PanelActionButtonType;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]