From 811543ce37bc04790da819fd33f35e308d9bb1b0 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 22 May 2001 00:11:10 +0000 Subject: Added properties. Based on patch by Lee Mallabone. 2001-05-21 Alexander Larsson * gtk/gtkfontsel.c: Added properties. Based on patch by Lee Mallabone. * gtk/gtkruler.c: * gtk/gtkhruler.c: * gtk/gtkvruler.c: * gtk/gtktext.c: * gtk/gtktextview.c: Converted GtkArg to GParam. Based on patches by John Margaglione. * tests/Makefile.am: * tests/testtext.c: Add a property editor to testtext. --- tests/Makefile.am | 4 ++++ tests/testtext.c | 13 +++++++++++++ 2 files changed, 17 insertions(+) (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index e8b3f9a60c..e3729bec77 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -83,6 +83,10 @@ testtreeview_SOURCES = \ prop-editor.c \ testtreeview.c +testtext_SOURCES = \ + prop-editor.c \ + testtext.c + EXTRA_DIST += @STRIP_BEGIN@ \ prop-editor.h \ testgtk.1 \ diff --git a/tests/testtext.c b/tests/testtext.c index 175e4f1c4b..476592efe4 100644 --- a/tests/testtext.c +++ b/tests/testtext.c @@ -7,6 +7,8 @@ #include #include +#include "prop-editor.h" + typedef struct _Buffer Buffer; typedef struct _View View; @@ -1080,6 +1082,16 @@ do_remove_tags (gpointer callback_data, } } +static void +do_properties (gpointer callback_data, + guint callback_action, + GtkWidget *widget) +{ + View *view = view_from_widget (widget); + + create_prop_editor (G_OBJECT (view->text_view), 0); +} + enum { RESPONSE_FORWARD, @@ -1253,6 +1265,7 @@ static GtkItemFactoryEntry menu_items[] = { "/Attributes/Color cycles", NULL, do_apply_colors, TRUE, NULL }, { "/Attributes/No colors", NULL, do_apply_colors, FALSE, NULL }, { "/Attributes/Remove all tags", NULL, do_remove_tags, 0, NULL }, + { "/Attributes/Properties", NULL, do_properties, 0, NULL }, { "/_Test", NULL, 0, 0, "" }, { "/Test/_Example", NULL, do_example, 0, NULL }, }; -- cgit v1.2.1