summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2000-12-16 07:01:48 +0000
committerHavoc Pennington <hp@src.gnome.org>2000-12-16 07:01:48 +0000
commite405f75c2b904698f71280348687254b91d8ff47 (patch)
tree3e94d6db1f35d1c9f60ce26ba6395b43851e661e /demos
parent9d41afc90a3f261db2cab33e240b34232c2b117f (diff)
downloadgdk-pixbuf-e405f75c2b904698f71280348687254b91d8ff47.tar.gz
General cleanup of the log attr iteration stuff. This should make e.g. the
2000-12-16 Havoc Pennington <hp@pobox.com> * gtk/gtktextiter.c: General cleanup of the log attr iteration stuff. This should make e.g. the delete key work again in the text widget... (gtk_text_iter_forward_cursor_positions): handle negative count (gtk_text_iter_backward_cursor_positions): handle negative count (gtk_text_iter_forward_word_ends): handle negative count (gtk_text_iter_backward_word_starts): handle negative count * gtk/gtktextlayout.h, gtk/gtktextlayout.c, gtk/gtktexttag.h, gtk/gtktexttag.c, gtk/gtktexttagtable.h, gtk/gtktexttagtable.c, gtk/gtktextbuffer.h, gtk/gtktextbuffer.c: Convert everything to GObject. No doubt will cause breakage. * demos/gtk-demo/textview.c: remove hacks around non-GObject-ification of the text objects * demos/gtk-demo/main.c (main): use g_object_set() to manipulate the text tag
Diffstat (limited to 'demos')
-rw-r--r--demos/gtk-demo/main.c22
-rw-r--r--demos/gtk-demo/textview.c5
2 files changed, 11 insertions, 16 deletions
diff --git a/demos/gtk-demo/main.c b/demos/gtk-demo/main.c
index f86cd122e..f49ca363c 100644
--- a/demos/gtk-demo/main.c
+++ b/demos/gtk-demo/main.c
@@ -274,9 +274,9 @@ button_press_event_cb (GtkTreeView *tree_view,
cbdata->path = path;
gtk_signal_connect (GTK_OBJECT (window),
- "destroy",
- window_closed_cb,
- cbdata);
+ "destroy",
+ window_closed_cb,
+ cbdata);
}
else
{
@@ -426,16 +426,16 @@ main (int argc, char **argv)
gtk_label_new ("Source"));
tag = gtk_text_buffer_create_tag (info_buffer, "title");
- gtk_object_set (GTK_OBJECT (tag),
- "font", "Sans 18",
- NULL);
+ g_object_set (G_OBJECT (tag),
+ "font", "Sans 18",
+ NULL);
tag = gtk_text_buffer_create_tag (info_buffer, "source");
- gtk_object_set (GTK_OBJECT (tag),
- "font", "Courier 10",
- "pixels_above_lines", 0,
- "pixels_below_lines", 0,
- NULL);
+ g_object_set (G_OBJECT (tag),
+ "font", "Courier 10",
+ "pixels_above_lines", 0,
+ "pixels_below_lines", 0,
+ NULL);
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
gtk_widget_show_all (window);
diff --git a/demos/gtk-demo/textview.c b/demos/gtk-demo/textview.c
index a6f6b2206..6a925fd4c 100644
--- a/demos/gtk-demo/textview.c
+++ b/demos/gtk-demo/textview.c
@@ -45,11 +45,6 @@ static char gray50_bits[] = {
0x02, 0x01
};
-/* FIXME once TextTag is a GObject remove these awful hacks ;-) */
-#define g_object_set gtk_object_set
-#undef G_OBJECT
-#define G_OBJECT(x) ((void*)x)
-
static void
create_tags (GtkTextBuffer *buffer)
{