[anjuta] glade: Adapt to API changes in git master and register stock items correctly



commit 317cbb4c56ca72ca28e97ba534156c978dc7bfc9
Author: Johannes Schmid <jhs gnome org>
Date:   Wed Jan 5 15:02:28 2011 +0100

    glade: Adapt to API changes in git master and register stock items correctly

 plugins/glade/anjuta-design-document.c |   11 +++--------
 plugins/glade/plugin.c                 |   12 ++++++------
 2 files changed, 9 insertions(+), 14 deletions(-)
---
diff --git a/plugins/glade/anjuta-design-document.c b/plugins/glade/anjuta-design-document.c
index 502d4c8..0eaec96 100644
--- a/plugins/glade/anjuta-design-document.c
+++ b/plugins/glade/anjuta-design-document.c
@@ -243,7 +243,6 @@ static gboolean idocument_can_redo(IAnjutaDocument *editor, GError **e)
 {
 	AnjutaDesignDocument* self = ANJUTA_DESIGN_DOCUMENT(editor);
 	GladeCommand *redo_item;
-	const gchar *redo_description = NULL;
 
 	GladeProject* project = glade_design_view_get_project(GLADE_DESIGN_VIEW(self));
 	if (!project)
@@ -253,10 +252,8 @@ static gboolean idocument_can_redo(IAnjutaDocument *editor, GError **e)
 	else
 	{
 		redo_item = glade_project_next_redo_item(project);
-		if (redo_item)
-			redo_description = redo_item->description;
 	}
-	return (redo_description != NULL);
+	return (redo_item != NULL);
 }
 
 /* Return true if editor can undo */
@@ -264,7 +261,6 @@ static gboolean idocument_can_undo(IAnjutaDocument *editor, GError **e)
 {
 	AnjutaDesignDocument* self = ANJUTA_DESIGN_DOCUMENT(editor);
 	GladeCommand *undo_item;
-	const gchar *undo_description = NULL;
 	GladeProject* project = glade_design_view_get_project(GLADE_DESIGN_VIEW(self));
 	if (!project)
 	{
@@ -273,10 +269,9 @@ static gboolean idocument_can_undo(IAnjutaDocument *editor, GError **e)
 	else
 	{
 		undo_item = glade_project_next_undo_item(project);
-		if (undo_item)
-			undo_description = undo_item->description;
+
 	}
-	return (undo_description != NULL);
+	return (undo_item != NULL);
 }
 
 /* Return true if editor can undo */
diff --git a/plugins/glade/plugin.c b/plugins/glade/plugin.c
index 7f91e25..c684886 100644
--- a/plugins/glade/plugin.c
+++ b/plugins/glade/plugin.c
@@ -177,12 +177,12 @@ register_stock_icons (AnjutaPlugin *plugin)
 
 	/* Register stock icons */
 	BEGIN_REGISTER_ICON (plugin);
-	REGISTER_ICON ("anjuta-glade-plugin-48.png",
-	               "glade-plugin-icon");
-	REGISTER_ICON ("anjuta-glade-widgets-24.png",
-	               "glade-plugin-widgets");
-	REGISTER_ICON ("anjuta-glade-palette-24.png",
-	               "glade-plugin-palette");
+	REGISTER_ICON_FULL ("anjuta-glade-plugin",
+	                    "glade-plugin-icon");
+	REGISTER_ICON_FULL ("anjuta-glade-widgets",
+	                    "glade-plugin-widgets");
+	REGISTER_ICON_FULL ("anjuta-glade-palette",
+	                    "glade-plugin-palette");
 	END_REGISTER_ICON;
 }
 



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