Add this function, replacing the broken gtk_label_get ()

2000-04-26  Havoc Pennington  <hp@redhat.com>

* gtk/gtklabel.c (gtk_label_get_text): Add this function,
replacing the broken gtk_label_get ()
This commit is contained in:
Havoc Pennington 2000-04-26 22:53:01 +00:00 committed by Havoc Pennington
parent 6b4e76ede6
commit ec60eb1baf
9 changed files with 58 additions and 12 deletions

View File

@ -1,3 +1,8 @@
2000-04-26 Havoc Pennington <hp@redhat.com>
* gtk/gtklabel.c (gtk_label_get_text): Add this function,
replacing the broken gtk_label_get ()
2000-04-15 Havoc Pennington <hp@pobox.com>
* gdk/gdkdnd.h: clean up enum format, remove extra comma,

View File

@ -1,3 +1,8 @@
2000-04-26 Havoc Pennington <hp@redhat.com>
* gtk/gtklabel.c (gtk_label_get_text): Add this function,
replacing the broken gtk_label_get ()
2000-04-15 Havoc Pennington <hp@pobox.com>
* gdk/gdkdnd.h: clean up enum format, remove extra comma,

View File

@ -1,3 +1,8 @@
2000-04-26 Havoc Pennington <hp@redhat.com>
* gtk/gtklabel.c (gtk_label_get_text): Add this function,
replacing the broken gtk_label_get ()
2000-04-15 Havoc Pennington <hp@pobox.com>
* gdk/gdkdnd.h: clean up enum format, remove extra comma,

View File

@ -1,3 +1,8 @@
2000-04-26 Havoc Pennington <hp@redhat.com>
* gtk/gtklabel.c (gtk_label_get_text): Add this function,
replacing the broken gtk_label_get ()
2000-04-15 Havoc Pennington <hp@pobox.com>
* gdk/gdkdnd.h: clean up enum format, remove extra comma,

View File

@ -1,3 +1,8 @@
2000-04-26 Havoc Pennington <hp@redhat.com>
* gtk/gtklabel.c (gtk_label_get_text): Add this function,
replacing the broken gtk_label_get ()
2000-04-15 Havoc Pennington <hp@pobox.com>
* gdk/gdkdnd.h: clean up enum format, remove extra comma,

View File

@ -1,3 +1,8 @@
2000-04-26 Havoc Pennington <hp@redhat.com>
* gtk/gtklabel.c (gtk_label_get_text): Add this function,
replacing the broken gtk_label_get ()
2000-04-15 Havoc Pennington <hp@pobox.com>
* gdk/gdkdnd.h: clean up enum format, remove extra comma,

View File

@ -1,3 +1,8 @@
2000-04-26 Havoc Pennington <hp@redhat.com>
* gtk/gtklabel.c (gtk_label_get_text): Add this function,
replacing the broken gtk_label_get ()
2000-04-15 Havoc Pennington <hp@pobox.com>
* gdk/gdkdnd.h: clean up enum format, remove extra comma,

View File

@ -337,6 +337,15 @@ gtk_label_get (GtkLabel *label,
*str = label->label;
}
gchar *
gtk_label_get_text (GtkLabel *label)
{
g_return_val_if_fail (label != NULL, NULL);
g_return_val_if_fail (GTK_IS_LABEL (label), NULL);
return g_strdup (label->label);
}
static void
gtk_label_finalize (GtkObject *object)
{

View File

@ -69,19 +69,17 @@ struct _GtkLabelClass
GtkMiscClass parent_class;
};
GtkType gtk_label_get_type (void);
GtkWidget* gtk_label_new (const char *str);
void gtk_label_set_text (GtkLabel *label,
const char *str);
void gtk_label_set_justify (GtkLabel *label,
GtkJustification jtype);
void gtk_label_set_pattern (GtkLabel *label,
const gchar *pattern);
void gtk_label_set_line_wrap (GtkLabel *label,
gboolean wrap);
void gtk_label_get (GtkLabel *label,
char **str);
GtkWidget *gtk_label_new (const char *str);
void gtk_label_set_text (GtkLabel *label,
const char *str);
void gtk_label_set_justify (GtkLabel *label,
GtkJustification jtype);
void gtk_label_set_pattern (GtkLabel *label,
const gchar *pattern);
void gtk_label_set_line_wrap (GtkLabel *label,
gboolean wrap);
gchar * gtk_label_get_text (GtkLabel *label);
/* Convenience function to set the name and pattern by parsing
* a string with embedded underscores, and return the appropriate
@ -95,6 +93,10 @@ guint gtk_label_parse_uline (GtkLabel *label,
# define gtk_label_set gtk_label_set_text
#endif /* GTK_DISABLE_COMPAT_H */
/* Deprecated */
void gtk_label_get (GtkLabel *label,
char **str);
#ifdef __cplusplus
}
#endif /* __cplusplus */