mirror of
https://gitlab.gnome.org/GNOME/glade.git
synced 2025-10-07 00:14:16 -04:00
Small cleanup: move create_label
to glade-editor.c
This commit is contained in:
parent
1c55bf3ed0
commit
30464c00c3
@ -2,6 +2,9 @@
|
||||
|
||||
* src/glade-widget.c: read the widget name
|
||||
from the xml file and minor cleanups.
|
||||
* src/glade-property-class.[ch]: move
|
||||
create_label to editor.c.
|
||||
* src/glade-editor.c: see above.
|
||||
|
||||
2003-07-27 Paolo Borelli <pborelli@katamail.com>
|
||||
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include "glade-debug.h"
|
||||
#include "glade-menu-editor.h"
|
||||
#include "glade-project.h"
|
||||
#include "glade-utils.h"
|
||||
|
||||
static void glade_editor_class_init (GladeEditorClass *class);
|
||||
static void glade_editor_init (GladeEditor *editor);
|
||||
@ -685,6 +686,24 @@ glade_editor_create_input_object (GladeEditorProperty *property,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
glade_editor_create_item_label (GladePropertyClass *class)
|
||||
{
|
||||
GtkWidget *label;
|
||||
gchar *text;
|
||||
|
||||
text = g_strdup_printf ("%s :", class->name);
|
||||
label = gtk_label_new (text);
|
||||
g_free (text);
|
||||
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
|
||||
|
||||
/* WARNING: This is not working */
|
||||
glade_util_widget_set_tooltip (label, class->tooltip);
|
||||
|
||||
return label;
|
||||
}
|
||||
|
||||
static void
|
||||
glade_editor_table_attach (GtkWidget *table, GtkWidget *child, gint pos, gint row)
|
||||
{
|
||||
@ -752,7 +771,7 @@ glade_editor_append_item_real (GladeEditorTable *table,
|
||||
return gtk_label_new ("Implement me !");
|
||||
}
|
||||
|
||||
label = glade_property_class_create_label (property->class);
|
||||
label = glade_editor_create_item_label (property->class);
|
||||
|
||||
glade_editor_table_attach (table->table_widget, label, 0, table->rows);
|
||||
glade_editor_table_attach (table->table_widget, input, 1, table->rows);
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include <gmodule.h>
|
||||
|
||||
#include "glade.h"
|
||||
#include "glade-xml-utils.h"
|
||||
#include "glade-choice.h"
|
||||
#include "glade-widget.h"
|
||||
#include "glade-widget-class.h"
|
||||
@ -988,31 +987,3 @@ glade_property_class_list_add_from_node (GladeXmlNode *node,
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* glade_property_class_create_label:
|
||||
* @class: The PropertyClass to create the name from
|
||||
*
|
||||
* Creates a GtkLabel widget containing the name of the property.
|
||||
* This funcion is used by the property editor to create the label
|
||||
* of the property.
|
||||
*
|
||||
* Return Value: a GtkLabel
|
||||
**/
|
||||
GtkWidget *
|
||||
glade_property_class_create_label (GladePropertyClass *class)
|
||||
{
|
||||
GtkWidget *label;
|
||||
gchar *text;
|
||||
|
||||
text = g_strdup_printf ("%s :", class->name);
|
||||
label = gtk_label_new (text);
|
||||
g_free (text);
|
||||
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
|
||||
|
||||
/* WARNING: This is not working */
|
||||
glade_util_widget_set_tooltip (label, class->tooltip);
|
||||
|
||||
return label;
|
||||
}
|
||||
|
||||
|
@ -192,9 +192,6 @@ GladePropertyClass * glade_property_class_new_from_spec (GParamSpec *spec);
|
||||
|
||||
void glade_property_class_free (GladePropertyClass *class);
|
||||
|
||||
GtkWidget * glade_property_class_create_label (GladePropertyClass *pclass);
|
||||
GtkWidget * glade_property_class_create_input (GladePropertyClass *pclass);
|
||||
|
||||
void glade_property_class_list_add_from_node (GladeXmlNode * node,
|
||||
GladeWidgetClass *class,
|
||||
GList **properties);
|
||||
|
Loading…
x
Reference in New Issue
Block a user