Commit dd9622ee authored by Tristan Van Berkom's avatar Tristan Van Berkom

Added info buttons and apis to enable/disable them + signals emitted to


	* src/glade-editor-property.[ch]: Added info buttons and
	  apis to enable/disable them + signals emitted to say what
	  doc book, page and searchstring should be used

	* src/glade-editor.[ch]: Same as glade-editor-property

	* src/glade-utils.c: Added functions for detecting and launching devhelp

	* src/glade-project-window.c: Check if we have devhelp installed; if we do
	  then show help buttons and launch devhelp upon "gtk-doc-search" signals

	* pixmaps/devhelp.png, pixmaps/Makefile.am: Added devhelp book icon

	* src/glade-app.c: Replace a gtk_widget_show_all with a gtk_widget_show
	  on the editor (to avoid needlessly showing hidden buttons).

	* src/glade-project.c: translated property nicks and blurbs.

	* src/glade-property-class.[ch]: Added 'virtual' member and resolve
	  it at initialization.

	* src/glade-widget-class.c: use g_build_filename instead of
	  g_strdup_printf for icon loading.
dified Files:
parent 1b58a8af
2006-04-26 Tristan Van Berkom <tvb@gnome.org>
* src/glade-editor-property.[ch]: Added info buttons and
apis to enable/disable them + signals emitted to say what
doc book, page and searchstring should be used
* src/glade-editor.[ch]: Same as glade-editor-property
* src/glade-utils.c: Added functions for detecting and launching devhelp
* src/glade-project-window.c: Check if we have devhelp installed; if we do
then show help buttons and launch devhelp upon "gtk-doc-search" signals
* pixmaps/devhelp.png, pixmaps/Makefile.am: Added devhelp book icon
* src/glade-app.c: Replace a gtk_widget_show_all with a gtk_widget_show
on the editor (to avoid needlessly showing hidden buttons).
* src/glade-project.c: translated property nicks and blurbs.
* src/glade-property-class.[ch]: Added 'virtual' member and resolve
it at initialization.
* src/glade-widget-class.c: use g_build_filename instead of
g_strdup_printf for icon loading.
2006-04-26 Tristan Van Berkom <tvb@gnome.org>
* configure.in: Relesed 2.91.1, now we are working on 2.91.2
......@@ -24,6 +50,21 @@
* src/glade-widget.c: Synonymous '-' and '_' in glade_widget_get_[packing_]property().
2006-04-25 Tristan Van Berkom <tvb@gnome.org>
* src/Makefile.am: added atk.xpm to $(libgladeuiinclude_HEADERS)
* doc/gladeui-sections.txt: Updated with new apis.
* widgets/gtk+.xml.in: Listed all atk action properties needed for the gtk
catalog.
* src/glade-property-class.c, src/glade.h: Added GLADE_TAG_ATK_ACTION &
GLADE_TAG_ATK_PROPERTY tag support and stripped out introspection on atk
properties.
* src/main.c: backed out the "GTK_MODULES=$GTK_MODULES:gail" module loading thing.
2006-04-25 Tristan Van Berkom <tvb@gnome.org>
* src/glade-builtins.c: Allowed negative custom integer specs.
......
......@@ -56,6 +56,7 @@ pixmaps_DATA = \
vscale.png \
vscrollbar.png \
vseparator.png \
window.png
window.png \
devhelp.png
EXTRA_DIST = $(pixmaps_DATA)
......@@ -369,7 +369,7 @@ glade_app_init (GladeApp *app)
app->priv->editor = GLADE_EDITOR (glade_editor_new ());
g_object_ref (app->priv->editor);
gtk_object_sink (GTK_OBJECT (app->priv->editor));
gtk_widget_show_all (GTK_WIDGET (app->priv->editor));
gtk_widget_show (GTK_WIDGET (app->priv->editor));
glade_editor_refresh (app->priv->editor);
/* Create clipboard */
......
......@@ -36,13 +36,19 @@
#include "glade-command.h"
#include "glade-project.h"
#include "glade-builtins.h"
#include "glade-marshallers.h"
enum {
PROP_0,
PROP_PROPERTY_CLASS,
PROP_USE_COMMAND
PROP_USE_COMMAND,
PROP_SHOW_INFO
};
enum {
GTK_DOC_SEARCH,
LAST_SIGNAL
};
static GtkTableClass *table_class;
static GladeEditorPropertyClass *editor_property_class;
......@@ -53,6 +59,7 @@ static GladeEditorPropertyClass *editor_property_class;
static GdkColor *insensitive_colour = NULL;
static GdkColor *normal_colour = NULL;
static guint glade_editor_property_signals[LAST_SIGNAL] = { 0 };
#define GLADE_PROPERTY_TABLE_ROW_SPACING 2
#define FLAGS_COLUMN_SETTING 0
......@@ -224,6 +231,60 @@ glade_editor_property_enabled_toggled_cb (GtkWidget *check,
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check)));
}
static const gchar *
glade_editor_property_guess_bookname (GladeEditorProperty *eprop)
{
gchar *guess = NULL;
GladeWidget *gwidget;
g_return_val_if_fail (GLADE_IS_PROPERTY (eprop->property), NULL);
g_return_val_if_fail (GLADE_IS_WIDGET (eprop->property->widget), NULL);
gwidget = eprop->property->widget;
if (GTK_IS_WIDGET (gwidget->object))
guess = "gtk";
return guess;
}
static void
glade_editor_property_info_clicked_cb (GtkWidget *info,
GladeEditorProperty *eprop)
{
gchar *search;
search = g_strdup_printf ("The %s property", eprop->property->class->id);
g_signal_emit (G_OBJECT (eprop),
glade_editor_property_signals[GTK_DOC_SEARCH],
0,
glade_editor_property_guess_bookname (eprop),
g_type_name (eprop->class->pspec->owner_type), search);
g_free (search);
}
static GtkWidget *
glade_editor_property_create_info_button (GladeEditorProperty *eprop)
{
GtkWidget *image, *button;
gchar *path;
path = g_build_filename (glade_pixmaps_dir, "devhelp.png", NULL);
button = gtk_button_new ();
image = gtk_image_new_from_file (path);
gtk_widget_show (image);
gtk_container_add (GTK_CONTAINER (button), image);
gtk_container_set_border_width (GTK_CONTAINER (button), 1);
g_free (path);
return button;
}
static GObject *
glade_editor_property_constructor (GType type,
guint n_construct_properties,
......@@ -261,9 +322,22 @@ glade_editor_property_constructor (GType type,
G_CALLBACK (glade_editor_property_enabled_toggled_cb), eprop);
}
/* Create the class specific input widget and add it */
eprop->input = GLADE_EDITOR_PROPERTY_GET_CLASS (eprop)->create_input (eprop);
gtk_widget_show (eprop->input);
gtk_box_pack_start (GTK_BOX (eprop), eprop->input, TRUE, TRUE, 0);
/* Create the informational button and add it */
eprop->info = glade_editor_property_create_info_button (eprop);
gtk_widget_show (eprop->info);
g_signal_connect (G_OBJECT (eprop->info), "clicked",
G_CALLBACK (glade_editor_property_info_clicked_cb), eprop);
gtk_box_pack_start (GTK_BOX (eprop), eprop->info, FALSE, FALSE, 2);
return obj;
}
......@@ -294,6 +368,12 @@ glade_editor_property_set_property (GObject *object,
case PROP_USE_COMMAND:
eprop->use_command = g_value_get_boolean (value);
break;
case PROP_SHOW_INFO:
if (g_value_get_boolean (value))
glade_editor_property_show_info (eprop);
else
glade_editor_property_hide_info (eprop);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
......@@ -316,6 +396,8 @@ glade_editor_property_get_property (GObject *object,
case PROP_USE_COMMAND:
g_value_set_boolean (value, eprop->use_command);
break;
case PROP_SHOW_INFO:
g_value_set_boolean (value, eprop->show_info);
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
......@@ -439,6 +521,18 @@ glade_editor_property_class_init (GladeEditorPropertyClass *eprop_class)
eprop_class->load = glade_editor_property_load_common;
eprop_class->create_input = NULL;
/* Signals */
glade_editor_property_signals[GTK_DOC_SEARCH] =
g_signal_new ("gtk-doc-search",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GladeEditorPropertyClass,
gtk_doc_search),
NULL, NULL,
glade_marshal_VOID__STRING_STRING_STRING,
G_TYPE_NONE, 3,
G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
/* Properties */
g_object_class_install_property
(object_class, PROP_PROPERTY_CLASS,
......@@ -454,6 +548,13 @@ glade_editor_property_class_init (GladeEditorPropertyClass *eprop_class)
_("Whether we should use the command API for the undo/redo stack"),
FALSE, G_PARAM_READWRITE));
g_object_class_install_property
(object_class, PROP_SHOW_INFO,
g_param_spec_boolean
("show-info", _("Show Info"),
_("Whether we should show an informational button"),
FALSE, G_PARAM_READWRITE));
/* Resolve label colors once class wide.
*/
label = gtk_label_new ("");
......@@ -602,7 +703,8 @@ glade_eprop_numeric_create_input (GladeEditorProperty *eprop)
G_IS_PARAM_SPEC_FLOAT (eprop->class->pspec) ||
G_IS_PARAM_SPEC_DOUBLE (eprop->class->pspec)
? 2 : 0);
gtk_widget_show (eprop_numeric->spin);
g_signal_connect (G_OBJECT (eprop_numeric->spin), "value_changed",
G_CALLBACK (glade_eprop_numeric_changed),
eprop);
......@@ -755,6 +857,8 @@ glade_eprop_enum_create_input (GladeEditorProperty *eprop)
eprop_enum->option_menu = gtk_option_menu_new ();
gtk_option_menu_set_menu (GTK_OPTION_MENU (eprop_enum->option_menu), menu);
gtk_widget_show_all (eprop_enum->option_menu);
g_type_class_unref (eclass);
return eprop_enum->option_menu;
......@@ -1017,9 +1121,10 @@ glade_eprop_flags_create_input (GladeEditorProperty *eprop)
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
button = gtk_button_new_with_label ("...");
gtk_widget_show (button);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_widget_show_all (hbox);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (glade_eprop_flags_show_dialog),
eprop);
......@@ -1472,17 +1577,19 @@ glade_eprop_text_create_input (GladeEditorProperty *eprop)
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (swindow), GTK_SHADOW_IN);
eprop_text->text_entry = gtk_text_view_new ();
gtk_widget_show (eprop_text->text_entry);
gtk_container_add (GTK_CONTAINER (swindow), eprop_text->text_entry);
gtk_container_add (GTK_CONTAINER (swindow), eprop_text->text_entry);
gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (swindow), TRUE, TRUE, 0);
gtk_widget_show_all (swindow);
g_signal_connect (G_OBJECT (eprop_text->text_entry), "focus-out-event",
G_CALLBACK (glade_eprop_text_text_view_focus_out),
eprop);
} else {
eprop_text->text_entry = gtk_entry_new ();
gtk_widget_show (eprop_text->text_entry);
gtk_box_pack_start (GTK_BOX (hbox), eprop_text->text_entry, TRUE, TRUE, 0);
g_signal_connect (G_OBJECT (eprop_text->text_entry), "activate",
......@@ -1496,6 +1603,7 @@ glade_eprop_text_create_input (GladeEditorProperty *eprop)
if (class->translatable) {
GtkWidget *button = gtk_button_new_with_label ("...");
gtk_widget_show (button);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
g_signal_connect (button, "clicked",
G_CALLBACK (glade_eprop_text_show_i18n_dialog),
......@@ -2769,12 +2877,14 @@ glade_eprop_adjustment_create_input (GladeEditorProperty *eprop)
glade_eprop_adjustment_table_add_label (table, 5, _("Page size :"),
_("The page size (in a GtkScrollbar this is the size of the area which is currently visible)"));
gtk_table_attach_defaults (table, eprop_adj->value, 1, 2, 0, 1);
gtk_table_attach_defaults (table, eprop_adj->lower, 1, 2, 1, 2);
gtk_table_attach_defaults (table, eprop_adj->upper, 1, 2, 2, 3);
gtk_table_attach_defaults (table, eprop_adj->value, 1, 2, 0, 1);
gtk_table_attach_defaults (table, eprop_adj->lower, 1, 2, 1, 2);
gtk_table_attach_defaults (table, eprop_adj->upper, 1, 2, 2, 3);
gtk_table_attach_defaults (table, eprop_adj->step_increment, 1, 2, 3, 4);
gtk_table_attach_defaults (table, eprop_adj->page_increment, 1, 2, 4, 5);
gtk_table_attach_defaults (table, eprop_adj->page_size, 1, 2, 5, 6);
gtk_table_attach_defaults (table, eprop_adj->page_size, 1, 2, 5, 6);
gtk_widget_show_all (widget);
return widget;
}
......@@ -2961,3 +3071,33 @@ glade_editor_property_load_by_widget (GladeEditorProperty *eprop,
}
glade_editor_property_load (eprop, property);
}
void
glade_editor_property_show_info (GladeEditorProperty *eprop)
{
g_return_if_fail (GLADE_IS_EDITOR_PROPERTY (eprop));
/* Just pretend to show these properties.
*/
if (eprop->class->virtual == FALSE)
gtk_widget_show (eprop->info);
else
{
gtk_widget_show (eprop->info);
gtk_widget_set_sensitive (eprop->info, FALSE);
}
eprop->show_info = TRUE;
g_object_notify (G_OBJECT (eprop), "show-info");
}
void
glade_editor_property_hide_info (GladeEditorProperty *eprop)
{
g_return_if_fail (GLADE_IS_EDITOR_PROPERTY (eprop));
gtk_widget_hide (eprop->info);
eprop->show_info = FALSE;
g_object_notify (G_OBJECT (eprop), "show-info");
}
......@@ -33,6 +33,8 @@ struct _GladeEditorProperty {
GtkWidget *check; /* Check button for optional properties.
*/
GtkWidget *info; /* Informational button
*/
gulong tooltip_id; /* signal connection id for tooltip changes */
gulong sensitive_id; /* signal connection id for sensitivity changes */
......@@ -48,6 +50,10 @@ struct _GladeEditorProperty {
* or skip directly to GladeProperty interface.
* (used for query dialogs).
*/
gboolean show_info; /* Whether we should show an informational button for this
* property
*/
};
struct _GladeEditorPropertyClass {
......@@ -57,6 +63,12 @@ struct _GladeEditorPropertyClass {
/* private */
GtkWidget *(* create_input) (GladeEditorProperty *);
void (* gtk_doc_search)(GladeEditorProperty *,
const gchar *,
const gchar *,
const gchar *);
};
......@@ -66,6 +78,10 @@ LIBGLADEUI_API
GladeEditorProperty *glade_editor_property_new (GladePropertyClass *class,
gboolean use_command);
LIBGLADEUI_API
GladeEditorProperty *glade_editor_property_new_from_widget (GladeWidget *widget,
const gchar *property,
gboolean use_command);
LIBGLADEUI_API
void glade_editor_property_load (GladeEditorProperty *eprop,
GladeProperty *property);
LIBGLADEUI_API
......@@ -73,10 +89,9 @@ void glade_editor_property_load_by_widget (GladeEditorProperty *
GladeWidget *widget);
LIBGLADEUI_API
gboolean glade_editor_property_supported (GParamSpec *pspec);
LIBGLADEUI_API
GladeEditorProperty *glade_editor_property_new_from_widget (GladeWidget *widget,
const gchar *property,
gboolean use_command);
void glade_editor_property_show_info (GladeEditorProperty *eprop);
LIBGLADEUI_API
void glade_editor_property_hide_info (GladeEditorProperty *eprop);
#endif // __GLADE_EDITOR_PROPERTY_H__
......@@ -45,14 +45,128 @@
#include "glade-editor-property.h"
#include "atk.xpm"
enum
{
PROP_0,
PROP_SHOW_INFO,
PROP_SHOW_CONTEXT_INFO
};
enum {
GTK_DOC_SEARCH,
LAST_SIGNAL
};
static GtkVBoxClass *parent_class = NULL;
static guint glade_editor_signals[LAST_SIGNAL] = { 0 };
static void glade_editor_reset_dialog (GladeEditor *editor);
static void
glade_editor_gtk_doc_search_cb (GladeEditorProperty *eprop,
const gchar *book,
const gchar *page,
const gchar *search,
GladeEditor *editor)
{
/* Just act as a hub for search signals here */
g_signal_emit (G_OBJECT (editor),
glade_editor_signals[GTK_DOC_SEARCH],
0, book, page, search);
}
static void
glade_editor_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
GladeEditor *editor = GLADE_EDITOR (object);
switch (prop_id)
{
case PROP_SHOW_INFO:
if (g_value_get_boolean (value))
glade_editor_show_info (editor);
else
glade_editor_hide_info (editor);
break;
case PROP_SHOW_CONTEXT_INFO:
if (g_value_get_boolean (value))
glade_editor_show_context_info (editor);
else
glade_editor_hide_context_info (editor);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
glade_editor_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GladeEditor *editor = GLADE_EDITOR (object);
switch (prop_id)
{
case PROP_SHOW_INFO:
g_value_set_boolean (value, editor->show_info);
break;
case PROP_SHOW_CONTEXT_INFO:
g_value_set_boolean (value, editor->show_context_info);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
glade_editor_class_init (GladeEditorClass *class)
{
GObjectClass *object_class;
parent_class = g_type_class_peek_parent (class);
object_class = G_OBJECT_CLASS (class);
object_class->set_property = glade_editor_set_property;
object_class->get_property = glade_editor_get_property;
class->gtk_doc_search = NULL;
/* Properties */
g_object_class_install_property
(object_class, PROP_SHOW_INFO,
g_param_spec_boolean ("show-info",
_("Show info"),
_("Whether to show an informational "
"button for the loaded widget"),
FALSE, G_PARAM_READABLE));
g_object_class_install_property
(object_class, PROP_SHOW_CONTEXT_INFO,
g_param_spec_boolean ("show-context-info",
_("Show context info"),
_("Whether to show an informational button for "
"each property and signal in the editor"),
FALSE, G_PARAM_READABLE));
/* Signals */
glade_editor_signals[GTK_DOC_SEARCH] =
g_signal_new ("gtk-doc-search",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GladeEditorClass,
gtk_doc_search),
NULL, NULL,
glade_marshal_VOID__STRING_STRING_STRING,
G_TYPE_NONE, 3,
G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
}
static GtkWidget *
......@@ -115,6 +229,58 @@ glade_editor_on_launch_click (GtkButton *button,
glade_widget_launch_editor (editor->loaded_widget);
}
static const gchar *
glade_editor_guess_bookname (GladeEditor *editor)
{
gchar *guess = NULL;
g_return_val_if_fail (GLADE_IS_WIDGET (editor->loaded_widget), NULL);
if (GTK_IS_WIDGET (editor->loaded_widget->object))
guess = "gtk";
return guess;
}
static void
glade_editor_on_docs_click (GtkButton *button,
GladeEditor *editor)
{
if (editor->loaded_widget)
g_signal_emit (G_OBJECT (editor),
glade_editor_signals[GTK_DOC_SEARCH],
0, glade_editor_guess_bookname (editor),
editor->loaded_widget->widget_class->name,
editor->loaded_widget->widget_class->name);
}
static GtkWidget *
glade_editor_create_info_button (void)
{
GtkWidget *image, *button;
GtkWidget *hbox, *label;
gchar *path;
path = g_build_filename (glade_pixmaps_dir, "devhelp.png", NULL);
button = gtk_button_new ();
hbox = gtk_hbox_new (FALSE, 0);
label = gtk_label_new_with_mnemonic ("_Documentation");
image = gtk_image_new_from_file (path);
gtk_box_pack_start (GTK_BOX (hbox), image, TRUE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
gtk_widget_show_all (hbox);
gtk_container_add (GTK_CONTAINER (button), hbox);
g_free (path);
return button;
}
static void
glade_editor_init (GladeEditor *editor)
{
......@@ -162,6 +328,24 @@ glade_editor_init (GladeEditor *editor)
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, TRUE, 0);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (glade_editor_on_reset_click), editor);
/* Documentation button
*/
editor->info_button = glade_editor_create_info_button ();
gtk_container_set_border_width (GTK_CONTAINER (editor->info_button),
GLADE_GENERIC_BORDER_WIDTH);
gtk_box_pack_start (GTK_BOX (hbox), editor->info_button, FALSE, TRUE, 0);
g_signal_connect (G_OBJECT (editor->info_button), "clicked",
G_CALLBACK (glade_editor_on_docs_click), editor);
gtk_widget_show_all (GTK_WIDGET (editor));
if (editor->show_info)
gtk_widget_show (editor->info_button);
else
gtk_widget_hide (editor->info_button);
gtk_widget_hide (editor);
}
GType
......@@ -253,6 +437,17 @@ glade_editor_table_append_item (GladeEditorTable *table,
GladeEditorProperty *property;
property = glade_editor_property_new (class, from_query_dialog == FALSE);
gtk_widget_show (GTK_WIDGET (property));
gtk_widget_show_all (property->eventbox);
if (table->editor->show_context_info)
glade_editor_property_show_info (property);
else
glade_editor_property_hide_info (property);
g_signal_connect (G_OBJECT (property), "gtk-doc-search",
G_CALLBACK (glade_editor_gtk_doc_search_cb),
table->editor);
glade_editor_table_attach (table->table_widget, property->eventbox, 0, table->rows);
glade_editor_table_attach (table->table_widget, GTK_WIDGET (property), 1, table->rows);
......@@ -385,7 +580,7 @@ glade_editor_table_create (GladeEditor *editor,
if (!glade_editor_table_append_items (table, class, type))
return NULL;
gtk_widget_show_all (table->table_widget);
gtk_widget_show (table->table_widget);
return table;
}
......@@ -548,7 +743,7 @@ glade_editor_load_packing_page (GladeEditor *editor, GladeWidget *widget)
glade_editor_property_load (editor_property, property);
}
gtk_widget_show_all (editor->packing_etable->table_widget);
gtk_widget_show (editor->packing_etable->table_widget);
gtk_box_pack_start (GTK_BOX (editor->vbox_packing),
editor->packing_etable->table_widget,
......@@ -1153,3 +1348,95 @@ glade_editor_reset_dialog (GladeEditor *editor)
}
gtk_widget_destroy (dialog);
}
void
glade_editor_show_info (GladeEditor *editor)
{
g_return_if_fail (GLADE_IS_EDITOR (editor));
if (editor->show_info != TRUE)
{
editor->show_info = TRUE;
gtk_widget_show (editor->info_button);
g_object_notify (G_OBJECT (editor), "show-info");
}
}
void
glade_editor_hide_info (GladeEditor *editor)
{
g_return_if_fail (GLADE_IS_EDITOR (editor));
if (editor->show_info == TRUE)
{
editor->show_info = FALSE;
gtk_widget_hide (editor->info_button);
g_object_notify (G_OBJECT (editor), "show-info");
}
}
void
glade_editor_show_context_info (GladeEditor *editor)
{
GList *list, *props;
GladeEditorTable *etable;
g_return_if_fail (GLADE_IS_EDITOR (editor));
if (editor->show_context_info != TRUE)
{
editor->show_context_info = TRUE;
for (list = editor->widget_tables; list; list = list->next)
{
etable = list->data;
for (props = etable->properties; props; props = props->next)
glade_editor_property_show_info
(GLADE_EDITOR_PROPERTY (list->data));
}
if (editor->packing_etable)
{
etable = editor->packing_etable;
for (props = etable->properties; props; props = props->next)
glade_editor_property_show_info
(GLADE_EDITOR_PROPERTY (list->data));
}
g_object_notify (G_OBJECT (editor), "show-context-info");
}
}
void
glade_editor_hide_context_info (GladeEditor *editor)
{
GList *list, *props;
GladeEditorTable *etable;
g_return_if_fail (GLADE_IS_EDITOR (editor));
if (editor->show_context_info != TRUE)
{
editor->show_context_info = TRUE;
for (list = editor->widget_tables; list; list = list->next)
{
etable = list->data;
for (props = etable->properties; props; props = props->next)
glade_editor_property_hide_info
(GLADE_EDITOR_PROPERTY (list->data));
}
if (editor->packing_etable)
{
etable = editor->packing_etable;
for (props = etable->properties; props; props = props->next)
glade_editor_property_hide_info
(GLADE_EDITOR_PROPERTY (list->data));
}
g_object_notify (G_OBJECT (editor), "show-context-info");
}
}