[anjuta] libanjuta: Add stock icons to add_widget_custom
- From: Johannes Schmid <jhs src gnome org>
- To: svn-commits-list gnome org
- Subject: [anjuta] libanjuta: Add stock icons to add_widget_custom
- Date: Tue, 9 Jun 2009 05:30:49 -0400 (EDT)
commit 645dc3440fdd5e3f1803d904838df3d2291042cf
Author: Johannes Schmid <jhs gnome org>
Date: Tue Jun 9 11:29:27 2009 +0200
libanjuta: Add stock icons to add_widget_custom
---
libanjuta/anjuta-shell.c | 3 ++-
libanjuta/anjuta-shell.h | 18 ++++++++++--------
src/anjuta-app.c | 8 +++++++-
3 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/libanjuta/anjuta-shell.c b/libanjuta/anjuta-shell.c
index babb0f8..ea220d7 100644
--- a/libanjuta/anjuta-shell.c
+++ b/libanjuta/anjuta-shell.c
@@ -313,11 +313,12 @@ void anjuta_shell_add_widget_custom (AnjutaShell *shell,
GtkWidget *widget,
const char *name,
const char *title,
+ const char *stock_id,
GtkWidget *label,
AnjutaShellPlacement placement,
GError **error)
{
- ANJUTA_SHELL_GET_IFACE (shell)->add_widget_custom (shell, widget, name, title, label,
+ ANJUTA_SHELL_GET_IFACE (shell)->add_widget_custom (shell, widget, name, title, stock_id, label,
placement, error);
}
diff --git a/libanjuta/anjuta-shell.h b/libanjuta/anjuta-shell.h
index c812041..7cc5d76 100644
--- a/libanjuta/anjuta-shell.h
+++ b/libanjuta/anjuta-shell.h
@@ -91,12 +91,13 @@ struct _AnjutaShellIface {
gboolean locked,
GError **error);
void (*add_widget_custom) (AnjutaShell *shell,
- GtkWidget *widget,
- const char *name,
- const char *title,
- GtkWidget *label,
- AnjutaShellPlacement placement,
- GError **error);
+ GtkWidget *widget,
+ const char *name,
+ const char *title,
+ const char *stock_id,
+ GtkWidget *label,
+ AnjutaShellPlacement placement,
+ GError **error);
void (*remove_widget) (AnjutaShell *shell,
GtkWidget *widget,
@@ -151,8 +152,9 @@ void anjuta_shell_add_widget (AnjutaShell *shell,
void anjuta_shell_add_widget_custom (AnjutaShell *shell,
GtkWidget *widget,
- const char *name,
- const char *title,
+ const char *name,
+ const char *title,
+ const char *stock_id,
GtkWidget *label,
AnjutaShellPlacement placement,
GError **error);
diff --git a/src/anjuta-app.c b/src/anjuta-app.c
index 5144ed7..0e293d6 100644
--- a/src/anjuta-app.c
+++ b/src/anjuta-app.c
@@ -959,6 +959,7 @@ anjuta_app_add_widget_custom (AnjutaShell *shell,
GtkWidget *widget,
const char *name,
const char *title,
+ const char *stock_id,
GtkWidget *label,
AnjutaShellPlacement placement,
GError **error)
@@ -975,7 +976,12 @@ anjuta_app_add_widget_custom (AnjutaShell *shell,
app = ANJUTA_APP (shell);
/* Add the widget to dock */
- item = gdl_dock_item_new (name, title, GDL_DOCK_ITEM_BEH_NORMAL);
+ /* Add the widget to dock */
+ if (stock_id == NULL)
+ item = gdl_dock_item_new (name, title, GDL_DOCK_ITEM_BEH_NORMAL);
+ else
+ item = gdl_dock_item_new_with_stock (name, title, stock_id,
+ GDL_DOCK_ITEM_BEH_NORMAL);
gtk_container_add (GTK_CONTAINER (item), widget);
gdl_dock_add_item (GDL_DOCK (app->dock),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]