summaryrefslogtreecommitdiff
path: root/src/gtkext
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2009-08-11 23:12:20 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2009-08-11 23:12:20 (GMT)
commit184249f07fb32fb2449723f5f94ce221015231b7 (patch)
treedba90857104a96be5d1fd07d3051cda474cb3e3b /src/gtkext
parent5cd25c4adfe0426520a51a76de3f77c77cfa4b8e (diff)
Improved the loading of several binaries.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@106 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/gtkext')
-rw-r--r--src/gtkext/gtkdockitem.c19
-rw-r--r--src/gtkext/gtkdockitem.h4
-rw-r--r--src/gtkext/gtkdockpanel.c1
3 files changed, 16 insertions, 8 deletions
diff --git a/src/gtkext/gtkdockitem.c b/src/gtkext/gtkdockitem.c
index c031c7f..fcef31d 100644
--- a/src/gtkext/gtkdockitem.c
+++ b/src/gtkext/gtkdockitem.c
@@ -143,7 +143,7 @@ const gchar *gtk_dock_item_get_name(GtkDockItem *ditem)
/******************************************************************************
* *
* Paramètres : ditem = composant GTK à modifier. *
-* name = nouveau nom à prendre en compte. *
+* desc = nouvelle description à prendre en compte. *
* *
* Description : Change la description du panneau dockable pour son titre. *
* *
@@ -153,12 +153,12 @@ const gchar *gtk_dock_item_get_name(GtkDockItem *ditem)
* *
******************************************************************************/
-void gtk_dock_item_set_desc(GtkDockItem *ditem, const gchar *name)
+void gtk_dock_item_set_desc(GtkDockItem *ditem, const gchar *desc)
{
- if (ditem->name != NULL)
- g_free(ditem->name);
+ if (ditem->desc != NULL)
+ g_free(ditem->desc);
- ditem->name = g_strdup(name);
+ ditem->desc = g_strdup(desc);
}
@@ -177,7 +177,14 @@ void gtk_dock_item_set_desc(GtkDockItem *ditem, const gchar *name)
const gchar *gtk_dock_item_get_desc(GtkDockItem *ditem)
{
- return ditem->name;
+ const char *result; /* CHaîne à renvoyer */
+
+ result = ditem->desc;
+
+ if (result == NULL)
+ result = gtk_dock_item_get_name(ditem);
+
+ return result;
}
diff --git a/src/gtkext/gtkdockitem.h b/src/gtkext/gtkdockitem.h
index 21ca360..906973c 100644
--- a/src/gtkext/gtkdockitem.h
+++ b/src/gtkext/gtkdockitem.h
@@ -47,7 +47,9 @@ struct _GtkDockItem
{
GtkObject object; /* Présence obligatoire en 1er */
- gchar *name; /* Nom court pour onglet */
+ gchar *name; /* Nom court pour titre */
+ gchar *desc; /* Nom long pour onglet */
+
GtkWidget *panel; /* Pnneau construit associé */
};
diff --git a/src/gtkext/gtkdockpanel.c b/src/gtkext/gtkdockpanel.c
index 41b71aa..536d21b 100644
--- a/src/gtkext/gtkdockpanel.c
+++ b/src/gtkext/gtkdockpanel.c
@@ -674,7 +674,6 @@ static gboolean gtk_dock_panel_update_title(GtkNotebook *notebook, GtkNotebookPa
ditem = GTK_DOCK_ITEM(g_list_nth_data(GTK_DOCK_PANEL(data)->ditems, index));
desc = gtk_dock_item_get_desc(ditem);
- if (desc == NULL) desc = gtk_dock_item_get_name(ditem);
str = calloc(strlen("<b>") + strlen(desc) + strlen("</b>") + 1, sizeof(char));