antiright-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Antiright-devel] antiright/gtkshell arguments.c button.c button....


From: Jeffrey Bedard
Subject: [Antiright-devel] antiright/gtkshell arguments.c button.c button....
Date: Mon, 14 May 2007 20:23:23 +0000

CVSROOT:        /sources/antiright
Module name:    antiright
Changes by:     Jeffrey Bedard <jefbed> 07/05/14 20:23:23

Modified files:
        gtkshell       : arguments.c button.c button.h containers.c 
                         font.c gtkshell.c gtkshell.h guidl_dictionary.c 
                         init.c label.c macros.h menu.c option_options.c 

Log message:
        Added preliminary toolbar support to app mode.
        Further conversion from macros, and standardization of duplicate macros.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/arguments.c?cvsroot=antiright&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/button.c?cvsroot=antiright&r1=1.41&r2=1.42
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/button.h?cvsroot=antiright&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/containers.c?cvsroot=antiright&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/font.c?cvsroot=antiright&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/gtkshell.c?cvsroot=antiright&r1=1.39&r2=1.40
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/gtkshell.h?cvsroot=antiright&r1=1.47&r2=1.48
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/guidl_dictionary.c?cvsroot=antiright&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/init.c?cvsroot=antiright&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/label.c?cvsroot=antiright&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/macros.h?cvsroot=antiright&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/menu.c?cvsroot=antiright&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/option_options.c?cvsroot=antiright&r1=1.29&r2=1.30

Patches:
Index: arguments.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/arguments.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- arguments.c 14 May 2007 18:06:34 -0000      1.26
+++ arguments.c 14 May 2007 20:23:22 -0000      1.27
@@ -61,6 +61,11 @@
 {
        gchar **menubar_tokens;
 
+#ifdef DEBUG
+       ARPASSERT(gsh);
+       ARPASSERT(string);
+#endif /* DEBUG */
+
        /* 
           This allows a group of buttons and menu buttons to be specified
           as one argument.  This is particularly useful in eliminating the
@@ -77,7 +82,7 @@
 void
 gsh_parse_arguments(GSH * gsh, const gint argc, const gchar **argv)
 {
-       int counter;
+       gint counter;
 
        for (counter = 1; counter < argc; counter++)
                (argv[counter][0] == '-') ?

Index: button.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/button.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- button.c    9 May 2007 20:00:56 -0000       1.41
+++ button.c    14 May 2007 20:23:22 -0000      1.42
@@ -44,15 +44,15 @@
 }
 
 static void
-setup_callback(struct GSH * gsh, const gchar * command)
+setup_callback(struct GSH * gsh, GtkWidget * button, const gchar * command)
 {
        if(!GSH_FLAG(GSH_MENU_BUTTON))
        {
                struct GSHCBData * cb;
 
                cb=ARNEW(gsh, GSHCBData, gsh, g_strdup(command));
-               (void)g_signal_connect(G_OBJECT(gsh->widgets.button), 
-                       GTK_IS_MENU_ITEM(gsh->widgets.button) 
+               (void)g_signal_connect(G_OBJECT(button), 
+                       GTK_IS_MENU_ITEM(button) 
                        ? "activate" : "clicked",
                        G_CALLBACK(cb->system), cb);
        }
@@ -76,7 +76,17 @@
 
        setup_label(button=gsh->widgets.button, command);
        gsh_setup_drag_drop(gsh, button);
-       setup_callback(gsh, command);
+       setup_callback(gsh, button, command);
+       if(GSH_FLAG(GSH_APP_MODE) && gsh->widgets.app.toolbar)
+       {
+               GtkWidget * toolbutton;
+
+               toolbutton=gtk_button_new_with_label(command);
+               gsh_setup_drag_drop(gsh, toolbutton);
+               setup_callback(gsh, toolbutton, command);
+               GSHCA(gsh->widgets.app.toolbar, toolbutton);
+               gtk_widget_show(toolbutton);
+       }
        if(GTK_IS_BUTTON(button))
                gtk_button_set_alignment(GTK_BUTTON(button), 0.0, 0.5);
 }
@@ -99,11 +109,12 @@
        return return_value;
 }
 
-#define GSH_COMMAND_BUTTON(gsh, command)\
-{\
-       create_button(gsh);\
-       setup_command_button(gsh, command);\
-       gsh_manage(gsh, gsh->widgets.button);\
+static void
+gsh_command_button(GSH * gsh, const gchar * command)
+{
+       create_button(gsh);
+       setup_command_button(gsh, command);
+       gsh_manage(gsh, gsh->widgets.button);
 }
 
 /* This is just a wrapper around gsh_new_button(), to
@@ -112,7 +123,7 @@
 gsh_add_button(struct GSH * gsh, const gchar * string)
 {
        if(!test_image_button(gsh, string))
-               GSH_COMMAND_BUTTON(gsh, string);
+               gsh_command_button(gsh, string);
 
        return gsh->widgets.button;
 }

Index: button.h
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/button.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- button.h    3 May 2007 20:49:20 -0000       1.8
+++ button.h    14 May 2007 20:23:22 -0000      1.9
@@ -23,9 +23,6 @@
 #ifndef GSH_BUTTON_H
 #define GSH_BUTTON_H
 
-void
-gsh_command_button(struct GSH * gsh, const gchar *command);
-
 GtkWidget *
 gsh_add_button(struct GSH * gsh, const gchar * string);
 

Index: containers.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/containers.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- containers.c        14 May 2007 18:06:34 -0000      1.20
+++ containers.c        14 May 2007 20:23:22 -0000      1.21
@@ -30,20 +30,18 @@
 static void
 set_scrolled_window_options(GtkWidget * win)
 {
-       GSWS(shadow_type, win, GTK_SHADOW_OUT);
+#define GSWSW(item, ...) GSWS(item, win, __VA_ARGS__)
+       GSWSW(shadow_type, GTK_SHADOW_OUT);
 /* Shortened name.  */
 #define GTKPA GTK_POLICY_AUTOMATIC
-       GSWS(policy, win, GTKPA, GTKPA);
+       GSWSW(policy, GTKPA, GTKPA);
 }
 
-#define GTKCA(container, widget)\
-       gtk_container_add(GTK_CONTAINER(container), widget)
-
 static void
 setup_scrolled_window_containers(GtkWidget * scrolled_window,
                GtkWidget * window, GtkWidget * hrow)
 {
-       GTKCA(window, scrolled_window);
+       GSHCA(window, scrolled_window);
        /* Add the main row manager to the scrolled window.  */
        gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(
                scrolled_window), hrow);
@@ -66,8 +64,8 @@
 setup_framed_containers(GtkWidget * frame, GtkWidget * window, 
        GtkWidget * hrow)
 {
-       GTKCA(window, frame);
-       GTKCA(frame, hrow);
+       GSHCA(window, frame);
+       GSHCA(frame, hrow);
 }
 
 static void
@@ -107,6 +105,6 @@
        else if (!GSH_FLAG(GSH_NO_BASE_FRAME))
                setup_framed(gsh);
        else
-               GTKCA(gsh->widgets.window, gsh->rows->h);
+               GSHCA(gsh->widgets.window, gsh->rows->h);
 }
 

Index: font.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/font.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- font.c      14 May 2007 12:16:11 -0000      1.7
+++ font.c      14 May 2007 20:23:22 -0000      1.8
@@ -26,10 +26,10 @@
 set_font(GtkWidget * widget, const gchar * font)
 {
        PangoFontDescription *font_desc;
-       
-       font_desc = pango_font_description_from_string(font);
+#define PFD(op, arg) pango_font_description_##op(arg)
+       font_desc = PFD(from_string, font);
        gtk_widget_modify_font(widget, font_desc);
-       pango_font_description_free(font_desc);
+       PFD(free, font_desc);
 }
 
 void

Index: gtkshell.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/gtkshell.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- gtkshell.c  14 May 2007 12:16:11 -0000      1.39
+++ gtkshell.c  14 May 2007 20:23:22 -0000      1.40
@@ -111,6 +111,7 @@
        setup_child_classes(gsh);
        setup_methods(gsh);
        setup_member_fields(gsh);
+       /* Add initial window.  */
        $(gsh, add.window);
 }
 

Index: gtkshell.h
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/gtkshell.h,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -b -r1.47 -r1.48
--- gtkshell.h  14 May 2007 18:06:34 -0000      1.47
+++ gtkshell.h  14 May 2007 20:23:22 -0000      1.48
@@ -64,6 +64,7 @@
                struct /* app mode */
                {
                        GtkWidget * menubar;
+                       GtkWidget * toolbar;
                        GtkWidget * status;
                        GtkWidget * frame;
                        GtkWidget * row;

Index: guidl_dictionary.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/guidl_dictionary.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- guidl_dictionary.c  9 May 2007 17:20:53 -0000       1.5
+++ guidl_dictionary.c  14 May 2007 20:23:22 -0000      1.6
@@ -24,44 +24,44 @@
 
 extern struct GDLEnvironment * gsh_guidl_env;
 
-#define GSH_DELETE_DICTIONARY(base, dict)\
-{\
-       if(base->dict != NULL)\
-       {\
-               $(base->dict, delete);\
-               base->dict=NULL;\
-       }\
-}
-
-#define GDD(dict) GSH_DELETE_DICTIONARY(dictionaries, dict);
-
-#define DELETE_CONTENTS()\
-{\
-       GDD(widget)\
-       GDD(option)\
-       GDD(dialog)\
+static void
+delete_dictionary(struct ARTupleVector * dict)
+{
+       if(dict)
+               $(dict, delete);
+}
+
+static void
+delete_contents(struct GDLDictionaries * dictionaries)
+{
+       delete_dictionary(dictionaries->widget);
+       delete_dictionary(dictionaries->option);
+       delete_dictionary(dictionaries->dialog);
 }
 
 static void
 gsh_delete_GDLDictionaries(struct GDLDictionaries * dictionaries)
 {
-       DELETE_CONTENTS();
+       delete_contents(dictionaries);
        g_free(dictionaries);
 }
 
-#define NULLIFY(dict) dictionaries->dict=NULL
 
-#define INITIALIZE_MEMBER_FIELDS() \
-{\
-       NULLIFY(widget);\
-       NULLIFY(dialog);\
-       NULLIFY(option);\
+static void
+initialize_member_fields(struct GDLDictionaries * dictionaries)
+{
+#define NULLIFY(dict) dictionaries->dict=NULL
+       NULLIFY(widget);
+       NULLIFY(dialog);
+       NULLIFY(option);
 }
 
-#define SETUP_GDLDICTIONARIES()\
-{\
-       INITIALIZE_MEMBER_FIELDS();\
-       dictionaries->delete=&gsh_delete_GDLDictionaries;\
+static void
+setup_GDLDictionaries(struct GDLDictionaries * dictionaries)
+{
+       initialize_member_fields(dictionaries);
+       /* Set up methods.  */
+       dictionaries->delete=&gsh_delete_GDLDictionaries;
 }
 
 struct GDLDictionaries *
@@ -70,7 +70,7 @@
        struct GDLDictionaries * dictionaries;
 
        dictionaries=g_malloc(sizeof(struct GDLDictionaries));
-       SETUP_GDLDICTIONARIES();
+       setup_GDLDictionaries(dictionaries);
 
        return dictionaries;
 }

Index: init.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/init.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- init.c      10 May 2007 00:08:28 -0000      1.9
+++ init.c      14 May 2007 20:23:22 -0000      1.10
@@ -18,18 +18,21 @@
   You should have received a copy of the GNU General Public License
   along with AntiRight; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  
USA
-*/
+   */
 
 #include "gtkshell.h"
 
-#define SETUP_QUIT_SIGNAL(window, signal) \
-       g_signal_connect(window, signal,\
-               G_CALLBACK(gtk_main_quit), NULL)
-
-#define SETUP_QUIT_SIGNALS(window) \
-{\
-       SETUP_QUIT_SIGNAL(window, "delete-event");\
-       SETUP_QUIT_SIGNAL(window, "destroy");\
+static void
+setup_quit_signal(GtkWindow * window, const gchar * signal)
+{
+       g_signal_connect(window, signal, G_CALLBACK(gtk_main_quit), NULL);
+}
+
+static void
+setup_quit_signals(GtkWindow * window)
+{
+       setup_quit_signal(window, "delete-event");
+       setup_quit_signal(window, "destroy");
 }
        
 
@@ -39,7 +42,7 @@
        GtkWidget *window;
 
        window = gsh->widgets.window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-       SETUP_QUIT_SIGNALS(window);
+       setup_quit_signals(window);
        
        return window;
 }

Index: label.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/label.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- label.c     14 May 2007 12:16:11 -0000      1.20
+++ label.c     14 May 2007 20:23:22 -0000      1.21
@@ -26,9 +26,10 @@
 static void
 set_options(struct GSH * gsh, GtkWidget *label)
 {
-       gtk_label_set_single_line_mode(GTK_LABEL(label), FALSE);
-       GSH_FLAG(GSH_HORIZONTAL_LABELS) ? gtk_label_set_angle(GTK_LABEL(label),
-               90.0) : gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
+#define GLS(attr, ...) gtk_label_set_##attr(GTK_LABEL(label), __VA_ARGS__)
+       GLS(single_line_mode, FALSE);
+       GSH_FLAG(GSH_HORIZONTAL_LABELS) ? 
+               GLS(angle, 90.0) : GLS(line_wrap, TRUE);
        gsh_widget_set_font(label, NULL);
 }
 
@@ -38,7 +39,7 @@
        GtkWidget *frame;
        
        frame=gtk_frame_new(NULL);
-       gtk_container_add(GTK_CONTAINER(frame), label);
+       GSHCA(frame, label);
        gtk_widget_show(label);
 
        return frame;
@@ -49,7 +50,8 @@
 {
        GtkWidget *label;
 
-       set_options(gsh, label=gtk_label_new(text));
+       label = gtk_label_new(text);
+       set_options(gsh, label);
        gsh_manage(gsh, GSH_FLAG(GSH_FRAMED_LABELS) 
                ? make_framed_label(label) : label);
 

Index: macros.h
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/macros.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- macros.h    11 May 2007 23:28:52 -0000      1.9
+++ macros.h    14 May 2007 20:23:22 -0000      1.10
@@ -50,5 +50,16 @@
        sysprintf("gtkshell -dw '%s:%d: FIXME'",\
                __FILE__, __LINE__)
 
+/* GSH Container Add */
+#define GSHCA(container, widget)\
+       gtk_container_add(GTK_CONTAINER(container), widget)
+/* Add without expansion.  */
+#define GSHCA_TIGHT(cont, widget)\
+       gtk_box_pack_start(GTK_BOX(cont), widget, FALSE, FALSE, 0);
+
+/* Create and show a widget at the same time.  */
+#define GSH_SHOW_CREATE(var, type, ...)\
+       gtk_widget_show(var=gtk_##type##_new(__VA_ARGS__))
+
 #endif /* not GSH_MACROS_H */
 

Index: menu.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/menu.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- menu.c      14 May 2007 12:16:11 -0000      1.13
+++ menu.c      14 May 2007 20:23:23 -0000      1.14
@@ -31,16 +31,13 @@
        gchar **pair;
 
        pair=g_strsplit(string, ",", 2);
-
 #ifdef DEBUG
        ARPASSERT(pair[0]);
 #endif /* DEBUG */
-
        if(pair[1])
                gsh_image_button(gsh, pair[0], pair[1]);
        else
                $(gsh, add.button, pair[0]);
-
        g_strfreev(pair);
 }
 
@@ -51,7 +48,6 @@
 
        for(i=1; ARPBOOL(tokens[i]); i++) 
                menuitem_parse(gsh, tokens[i]);
-       
 }
 
 
@@ -69,14 +65,6 @@
        GSHR->v=(GtkWidget *)old_row;
 }
 
-#define CONT_ADD(cont, widget)\
-       gtk_container_add(GTK_CONTAINER(cont), widget)
-#define CONT_ADD_TIGHT(cont, widget)\
-       gtk_box_pack_start(GTK_BOX(cont), widget, FALSE, FALSE, 0);
-
-#define SHOW_CREAT(var, type, ...)\
-       gtk_widget_show(var=gtk_##type##_new(__VA_ARGS__))
-
 #define GW gsh->widgets
 #define GWA GW.app
 
@@ -85,41 +73,52 @@
 {
        GtkWidget * status_frame;
 
-       SHOW_CREAT(status_frame, frame, NULL);
+       GSH_SHOW_CREATE(status_frame, frame, NULL);
        gtk_frame_set_shadow_type(GTK_FRAME(status_frame), GTK_SHADOW_IN);
-       CONT_ADD_TIGHT(GWA.row, status_frame);
-       SHOW_CREAT(GWA.status, label, "status");
-       CONT_ADD(status_frame, GWA.status);
+       GSHCA_TIGHT(GWA.row, status_frame);
+       GSH_SHOW_CREATE(GWA.status, label, "status");
+       GSHCA(status_frame, GWA.status);
 }
 
-#define SETUP_APP_MODE_FRAME(gsh)\
-{\
-       SHOW_CREAT(GWA.frame, frame, NULL);\
-       CONT_ADD(GWA.row, GWA.frame);\
+static void
+setup_app_mode_toolbar(GSH * gsh)
+{
+       GSH_SHOW_CREATE(GWA.toolbar, toolbar);
+       GSHCA_TIGHT(GWA.row, GWA.toolbar);
+}
+
+static void
+setup_app_mode_frame(GSH * gsh)
+{
+       GSH_SHOW_CREATE(GWA.frame, frame, NULL);
+       GSHCA(GWA.row, GWA.frame);
 }
 
 static void
 setup_app_mode(struct GSH * gsh)
 {
-       SHOW_CREAT(GWA.row, vbox, FALSE, 1);
+       GSH_SHOW_CREATE(GWA.row, vbox, FALSE, 1);
        /* Add menu bar to application column.  */
-/* FIXME:  add such that it does not expand.  */
-       CONT_ADD_TIGHT(GWA.row, GWA.menubar);
-       SETUP_APP_MODE_FRAME(gsh);
+       GSHCA_TIGHT(GWA.row, GWA.menubar);
+       setup_app_mode_toolbar(gsh);
+       setup_app_mode_frame(gsh);
        setup_app_mode_status_bar(gsh);
 }
 
-#define MANAGE_MENU_BAR(gsh) \
-       GSH_FLAG(GSH_APP_MODE) ?  setup_app_mode(gsh)\
+static void
+manage_menu_bar(GSH * gsh)
+{
+       GSH_FLAG(GSH_APP_MODE) ?  setup_app_mode(gsh)
                : $(gsh, manage, GWA.menubar);
+}
 
 static GtkWidget *
 add_menu_bar(struct GSH * gsh)
 {
        if(!GWA.menubar)
        {
-               gtk_widget_show(GWA.menubar=gtk_menu_bar_new());
-               MANAGE_MENU_BAR(gsh);
+               GSH_SHOW_CREATE(GWA.menubar, menu_bar);
+               manage_menu_bar(gsh);
        }
 
        return GWA.menubar;

Index: option_options.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/option_options.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- option_options.c    14 May 2007 18:06:34 -0000      1.29
+++ option_options.c    14 May 2007 20:23:23 -0000      1.30
@@ -34,39 +34,44 @@
        /* Recreate main window as popup type.  This is not recommended, but is
           necessary when using window managers that do not decorate according
           to hints, such as evilwm.  */
-       window=GTK_WINDOW(gsh->widgets.window=gtk_window_new(GTK_WINDOW_POPUP));
+       gsh->widgets.window=gtk_window_new(GTK_WINDOW_POPUP);
+       window=GTK_WINDOW(gsh->widgets.window);
 
-       gtk_window_set_type_hint(window, GDK_WINDOW_TYPE_HINT_DESKTOP);
-       gtk_window_set_decorated(window, FALSE);
-       gtk_window_set_skip_taskbar_hint(window, TRUE);
+       /* GTK WINDOW SET */
+#define GWS(attr, ...) gtk_window_set_##attr(window, __VA_ARGS__)
+       GWS(type_hint, GDK_WINDOW_TYPE_HINT_DESKTOP);
+       GWS(decorated, FALSE);
+       GWS(skip_taskbar_hint, TRUE);
        /* Show window on all desktops.  */
        gtk_window_stick(window);
        /* Window does not seem to really accept focus when this is set, most
           likely because of the POPUP option's side effect of overriding
           window manager redirection. */
-       gtk_window_set_accept_focus(window, TRUE);
+       GWS(accept_focus, TRUE);
 }
 
 static void
 set_icon_size(GSH * gsh, const gchar * arg)
 {
-
        /* Define some shortcuts.  */
 #define GIS gsh->icon_size
+       /* GTK_ICON_SIZE_ */
+#define GTKIS(size) GTK_ICON_SIZE_##size
+       /* Test for gsh->icon_size equality.  */
 #define GISCMP(text) !strcmp(text, arg)
 
        if(GISCMP("menu"))
-               gsh->icon_size=GTK_ICON_SIZE_MENU;
+               gsh->icon_size=GTKIS(MENU);
        else if(GISCMP("small toolbar"))
-               GIS=GTK_ICON_SIZE_SMALL_TOOLBAR;
+               GIS=GTKIS(SMALL_TOOLBAR);
        else if(GISCMP("large toolbar") || GISCMP("toolbar"))
-               GIS=GTK_ICON_SIZE_LARGE_TOOLBAR;
+               GIS=GTKIS(LARGE_TOOLBAR);
        else if(GISCMP("button"))
-               GIS=GTK_ICON_SIZE_BUTTON;
+               GIS=GTKIS(BUTTON);
        else if(GISCMP("dialog"))       
-               GIS=GTK_ICON_SIZE_DIALOG;
+               GIS=GTKIS(DIALOG);
        else /* default */
-               GIS=GTK_ICON_SIZE_DND;
+               GIS=GTKIS(DND);
 }
 
 void
@@ -152,7 +157,8 @@
 
        case 'T': /* Set the window title.  */
                GSH_COUNT(argc, counter);
-               gtk_window_set_title(GTK_WINDOW(gsh->widgets.window), 
argv[*counter]);
+               gtk_window_set_title(GTK_WINDOW(gsh->widgets.window),
+                               argv[*counter]);
                break;
 
        case 't':




reply via email to

[Prev in Thread] Current Thread [Next in Thread]