antiright-devel
[Top][All Lists]
Advanced

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

[Antiright-devel] antiright/gtkshell Makefile option_options.c op...


From: Jeffrey Bedard
Subject: [Antiright-devel] antiright/gtkshell Makefile option_options.c op...
Date: Wed, 16 Jan 2008 21:33:08 +0000

CVSROOT:        /sources/antiright
Module name:    antiright
Changes by:     Jeffrey Bedard <jefbed> 08/01/16 21:33:08

Modified files:
        gtkshell       : Makefile option_options.c option_options.h 
                         options.c 

Log message:
        Move setting over to option_options.c, work with ARWM to implement 
NET_WM
        hints properly, instead of using popup OverrideRedirect.  

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/Makefile?cvsroot=antiright&r1=1.53&r2=1.54
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/option_options.c?cvsroot=antiright&r1=1.39&r2=1.40
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/option_options.h?cvsroot=antiright&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/options.c?cvsroot=antiright&r1=1.40&r2=1.41

Patches:
Index: Makefile
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/Makefile,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -b -r1.53 -r1.54
--- Makefile    20 Dec 2007 15:09:12 -0000      1.53
+++ Makefile    16 Jan 2008 21:33:07 -0000      1.54
@@ -38,7 +38,7 @@
        guidl_util.o about_dialog.o init.o guidl_dialog.o guidl_dictionary.o\
        guidl_options.o guidl_widgets.o update_manager.o pane.o\
        command_shell.o app_mode.o clock.o tree.o form.o dialog.o swallow.o\
-       GSHWidget.o quickstart.o undo.o color.o add_options.o
+       GSHWidget.o quickstart.o undo.o color.o add_options.o option_options.o
 
 program=main.o 
 

Index: option_options.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/option_options.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- option_options.c    13 Dec 2007 17:20:24 -0000      1.39
+++ option_options.c    16 Jan 2008 21:33:07 -0000      1.40
@@ -23,4 +23,164 @@
 
 #include "gtkshell.h"
 
+void
+gsh_option_app_mode_cb(GSH * gsh, gint * counter, const gchar ** argv)
+{
+       GSH_SET(GSH_APP_MODE);
+}
+
+void
+gsh_option_check_commands_cb(GSH * gsh, gint * counter, const gchar ** argv)
+{
+       GSH_SET(GSH_CHECK_COMMANDS);
+}
+
+void
+gsh_option_color_cb(GSH * gsh, gint * counter, const gchar ** argv)
+{
+       gsh->editor.bgcolor=(gchar *)argv[++(*counter)];
+       gsh->editor.fgcolor=(gchar *)argv[++(*counter)];
+}
+
+void
+gsh_option_no_dummy_cb(GSH * gsh, gint * counter, const gchar ** argv)
+{
+       GSH_SET(GSH_GUIDL_NO_DUMMY);
+}
+
+/*GSH_OPTION_SET_FUNCTION(GSH_PROMPT_ECHOES); */
+
+void
+gsh_option_echoes_cb(GSH * gsh, gint * counter, const gchar ** argv)
+{
+       GSH_SET(GSH_PROMPT_ECHOES);
+}
+
+void
+gsh_option_exits_cb(GSH * gsh, gint * counter, const gchar ** argv)
+{
+       GSH_SET(GSH_CBEXIT);
+}
+
+void
+gsh_option_no_base_frame_cb(GSH * gsh, gint * counter, const gchar ** argv)
+{
+       GSH_SET(GSH_NO_BASE_FRAME);
+}
+
+void
+gsh_option_framed_labels_cb(GSH * gsh, gint * counter, const gchar ** argv)
+{
+       GSH_SET(GSH_FRAMED_LABELS);
+}
+
+void
+gsh_option_geometry_cb(GSH * gsh, gint * counter, const gchar ** argv)
+{
+       ARIFP(gsh->geometry)
+               g_free(gsh->geometry);
+       gsh->geometry=g_strdup(argv[++(*counter)]);
+}
+
+void
+gsh_option_horiz_clock_cb(GSH * gsh, gint * counter, const gchar ** argv)
+{
+       GSH_SET(GSH_HORIZ_CLOCK);
+}
+
+void
+gsh_option_horiz_labels_cb(GSH * gsh, gint * counter, const gchar ** argv)
+{
+       GSH_SET(GSH_HORIZONTAL_LABELS);
+}
+
+void
+gsh_option_icon_size_cb(GSH * gsh, gint * counter, const gchar ** argv)
+{
+       (*counter)++;
+        /* Define some shortcuts.  */
+#define GIS gsh->icon_size
+        /* Test for gsh->icon_size equality. 
+          Note, only the first three characters are used.   */
+#define GISCMP(text) !strncmp(text, argv[*counter], 3) 
+#define IFGISCMP(str, icon_size)\
+       { if(GISCMP(str)) { GIS=GTK_ICON_SIZE##icon_size; return; } }
+
+        GSH_SET(GSH_ICON_SIZE_IS_CUSTOM);
+       
+       IFGISCMP("menu", _MENU);
+       IFGISCMP("small toolbar", _SMALL_TOOLBAR);
+       IFGISCMP("large toolbar", _LARGE_TOOLBAR);
+       IFGISCMP("toolbar", _SMALL_TOOLBAR);
+       IFGISCMP("medium", _BUTTON);
+       IFGISCMP("button", _BUTTON);
+       IFGISCMP("dialog", _DIALOG);
+       IFGISCMP("DND", _DND);
+       IFGISCMP("dnd", _DND);
+       /* Default */
+       GIS=GTK_ICON_SIZE_BUTTON;
+}
+
+void
+gsh_option_expand_cb(GSH * gsh, gint * counter, const gchar ** argv)
+{
+       GSH_SET(GSH_NO_EXPAND);
+}
+
+void
+gsh_option_no_expand_cb(GSH * gsh, gint * counter, const gchar ** argv)
+{
+       GSH_UNSET(GSH_NO_EXPAND);
+}
+
+void
+gsh_option_no_decorations_cb(GSH * gsh, gint * counter, const gchar ** argv)
+{
+       GtkWindow * window;
+
+       /* Until ARWM handles docks correctly, this will have to be done.  */
+#define ARWM_SUPPORTS_DOCKS
+#ifdef ARWM_SUPPORTS_DOCKS
+       gsh->widgets.window=gtk_window_new(GTK_WINDOW_TOPLEVEL);
+#else
+       gsh->widgets.window=gtk_window_new(GTK_WINDOW_POPUP);
+#endif
+       window=GTK_WINDOW(gsh->widgets.window);
+       gtk_window_set_type_hint(window, GDK_WINDOW_TYPE_HINT_DOCK);
+       gtk_window_set_decorated(window, FALSE);
+       gtk_window_set_skip_taskbar_hint(window, TRUE);
+       gtk_window_set_accept_focus(window, TRUE);
+       gtk_window_stick(window);
+}
+
+void
+gsh_option_pane_next_cb(GSH * gsh, gint * counter, const gchar ** argv)
+{
+       GSH_SET(GSH_PANE_NEXT);
+}
+
+void
+gsh_option_rows_cb(GSH * gsh, gint * counter, const gchar ** argv)
+{
+       gsh->rows->total=(unsigned int)atoi(argv[++(*counter)]);
+}
+
+void
+gsh_option_scroll_cb(GSH * gsh, gint * counter, const gchar ** argv)
+{
+       GSH_SET(GSH_SCROLL);
+}
+
+void
+gsh_option_title_cb(GSH * gsh, gint * counter, const gchar ** argv)
+{
+       gtk_window_set_title(GTK_WINDOW(gsh->widgets.window),
+               argv[++(*counter)]);
+}
+
+void
+gsh_option_update_cb(GSH * gsh, gint * counter, const gchar ** argv)
+{
+       gsh->update->period=atoi(argv[++(*counter)]);
+}
 

Index: option_options.h
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/option_options.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- option_options.h    13 Dec 2007 17:20:25 -0000      1.10
+++ option_options.h    16 Jan 2008 21:33:07 -0000      1.11
@@ -1,6 +1,6 @@
 /*
   AntiRight
-  (c) 2002-2007 Jeffrey Bedard
+  (c); 2002-2007 Jeffrey Bedard
   address@hidden
 
   This file is part of AntiRight.
@@ -8,7 +8,7 @@
   AntiRight is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
-  (at your option) any later version.
+  (at your option); any later version.
 
   AntiRight is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -23,4 +23,64 @@
 #ifndef GSH_OPTION_OPTIONS_H
 #define GSH_OPTION_OPTIONS_H
 
+void
+gsh_option_app_mode_cb(GSH * gsh, gint * counter, const gchar ** argv);
+
+void
+gsh_option_check_commands_cb(GSH * gsh, gint * counter, const gchar ** argv);
+
+void
+gsh_option_color_cb(GSH * gsh, gint * counter, const gchar ** argv);
+
+void
+gsh_option_no_dummy_cb(GSH * gsh, gint * counter, const gchar ** argv);
+
+void
+gsh_option_echoes_cb(GSH * gsh, gint * counter, const gchar ** argv);
+
+void
+gsh_option_exits_cb(GSH * gsh, gint * counter, const gchar ** argv);
+
+void
+gsh_option_no_base_frame_cb(GSH * gsh, gint * counter, const gchar ** argv);
+
+void
+gsh_option_framed_labels_cb(GSH * gsh, gint * counter, const gchar ** argv);
+
+void
+gsh_option_geometry_cb(GSH * gsh, gint * counter, const gchar ** argv);
+
+void
+gsh_option_horiz_clock_cb(GSH * gsh, gint * counter, const gchar ** argv);
+
+void
+gsh_option_horiz_labels_cb(GSH * gsh, gint * counter, const gchar ** argv);
+
+void
+gsh_option_icon_size_cb(GSH * gsh, gint * counter, const gchar ** argv);
+
+void
+gsh_option_expand_cb(GSH * gsh, gint * counter, const gchar ** argv);
+
+void
+gsh_option_no_expand_cb(GSH * gsh, gint * counter, const gchar ** argv);
+
+void
+gsh_option_no_decorations_cb(GSH * gsh, gint * counter, const gchar ** argv);
+
+void
+gsh_option_pane_next_cb(GSH * gsh, gint * counter, const gchar ** argv);
+
+void
+gsh_option_rows_cb(GSH * gsh, gint * counter, const gchar ** argv);
+
+void
+gsh_option_scroll_cb(GSH * gsh, gint * counter, const gchar ** argv);
+
+void
+gsh_option_title_cb(GSH * gsh, gint * counter, const gchar ** argv);
+
+void
+gsh_option_update_cb(GSH * gsh, gint * counter, const gchar ** argv);
+
 #endif

Index: options.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/options.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- options.c   20 Dec 2007 15:09:12 -0000      1.40
+++ options.c   16 Jan 2008 21:33:07 -0000      1.41
@@ -95,160 +95,6 @@
 {
 }
 
-static void
-option_app_mode_cb(GSH * gsh, gint * counter, const gchar ** argv)
-{
-       GSH_SET(GSH_APP_MODE);
-}
-
-static void
-option_check_commands_cb(GSH * gsh, gint * counter, const gchar ** argv)
-{
-       GSH_SET(GSH_CHECK_COMMANDS);
-}
-
-static void
-option_color_cb(GSH * gsh, gint * counter, const gchar ** argv)
-{
-       gsh->editor.bgcolor=(gchar *)argv[++(*counter)];
-       gsh->editor.fgcolor=(gchar *)argv[++(*counter)];
-}
-
-static void
-option_no_dummy_cb(GSH * gsh, gint * counter, const gchar ** argv)
-{
-       GSH_SET(GSH_GUIDL_NO_DUMMY);
-}
-
-/*GSH_OPTION_SET_FUNCTION(GSH_PROMPT_ECHOES); */
-
-static void
-option_echoes_cb(GSH * gsh, gint * counter, const gchar ** argv)
-{
-       GSH_SET(GSH_PROMPT_ECHOES);
-}
-
-static void
-option_exits_cb(GSH * gsh, gint * counter, const gchar ** argv)
-{
-       GSH_SET(GSH_CBEXIT);
-}
-
-static void
-option_no_base_frame_cb(GSH * gsh, gint * counter, const gchar ** argv)
-{
-       GSH_SET(GSH_NO_BASE_FRAME);
-}
-
-static void
-option_framed_labels_cb(GSH * gsh, gint * counter, const gchar ** argv)
-{
-       GSH_SET(GSH_FRAMED_LABELS);
-}
-
-static void
-option_geometry_cb(GSH * gsh, gint * counter, const gchar ** argv)
-{
-       ARIFP(gsh->geometry)
-               g_free(gsh->geometry);
-       gsh->geometry=g_strdup(argv[++(*counter)]);
-}
-
-static void
-option_horiz_clock_cb(GSH * gsh, gint * counter, const gchar ** argv)
-{
-       GSH_SET(GSH_HORIZ_CLOCK);
-}
-
-static void
-option_horiz_labels_cb(GSH * gsh, gint * counter, const gchar ** argv)
-{
-       GSH_SET(GSH_HORIZONTAL_LABELS);
-}
-
-static void
-option_icon_size_cb(GSH * gsh, gint * counter, const gchar ** argv)
-{
-       (*counter)++;
-        /* Define some shortcuts.  */
-#define GIS gsh->icon_size
-        /* Test for gsh->icon_size equality. 
-          Note, only the first three characters are used.   */
-#define GISCMP(text) !strncmp(text, argv[*counter], 3) 
-#define IFGISCMP(str, icon_size)\
-       { if(GISCMP(str)) { GIS=GTK_ICON_SIZE##icon_size; return; } }
-
-        GSH_SET(GSH_ICON_SIZE_IS_CUSTOM);
-       
-       IFGISCMP("menu", _MENU);
-       IFGISCMP("small toolbar", _SMALL_TOOLBAR);
-       IFGISCMP("large toolbar", _LARGE_TOOLBAR);
-       IFGISCMP("toolbar", _SMALL_TOOLBAR);
-       IFGISCMP("medium", _BUTTON);
-       IFGISCMP("button", _BUTTON);
-       IFGISCMP("dialog", _DIALOG);
-       IFGISCMP("DND", _DND);
-       IFGISCMP("dnd", _DND);
-       /* Default */
-       GIS=GTK_ICON_SIZE_BUTTON;
-}
-
-static void
-option_expand_cb(GSH * gsh, gint * counter, const gchar ** argv)
-{
-       GSH_SET(GSH_NO_EXPAND);
-}
-
-static void
-option_no_expand_cb(GSH * gsh, gint * counter, const gchar ** argv)
-{
-       GSH_UNSET(GSH_NO_EXPAND);
-}
-
-static void
-option_no_decorations_cb(GSH * gsh, gint * counter, const gchar ** argv)
-{
-       GtkWindow * window;
-
-       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_accept_focus(window, TRUE);
-       gtk_window_stick(window);
-}
-
-static void
-option_pane_next_cb(GSH * gsh, gint * counter, const gchar ** argv)
-{
-       GSH_SET(GSH_PANE_NEXT);
-}
-
-static void
-option_rows_cb(GSH * gsh, gint * counter, const gchar ** argv)
-{
-       gsh->rows->total=(unsigned int)atoi(argv[++(*counter)]);
-}
-
-static void
-option_scroll_cb(GSH * gsh, gint * counter, const gchar ** argv)
-{
-       GSH_SET(GSH_SCROLL);
-}
-
-static void
-option_title_cb(GSH * gsh, gint * counter, const gchar ** argv)
-{
-       gtk_window_set_title(GTK_WINDOW(gsh->widgets.window),
-               argv[++(*counter)]);
-}
-
-static void
-option_update_cb(GSH * gsh, gint * counter, const gchar ** argv)
-{
-       gsh->update->period=atoi(argv[++(*counter)]);
-}
 
 static void
 guidl_file_cb(GSH * gsh, gint * counter, const gchar ** argv)
@@ -292,26 +138,26 @@
        ARTDEF("-aup",  gsh_add_updating_progress_cb);
 
        /* Options */
-       ARTDEF("-oa", option_app_mode_cb);
-       ARTDEF("-oC", option_check_commands_cb);
-       ARTDEF("-oc", option_color_cb);
-       ARTDEF("-oD", option_no_dummy_cb);
-       ARTDEF("-oE", option_echoes_cb);
-       ARTDEF("-oe", option_exits_cb);
-       ARTDEF("-oF", option_no_base_frame_cb);
-       ARTDEF("-of", option_framed_labels_cb);
-       ARTDEF("-og", option_geometry_cb);
-       ARTDEF("-oH", option_horiz_clock_cb);
-       ARTDEF("-oh", option_horiz_labels_cb);
-       ARTDEF("-oi", option_icon_size_cb);
-       ARTDEF("-ol", option_no_expand_cb);
-       ARTDEF("-oL", option_expand_cb);
-       ARTDEF("-on", option_no_decorations_cb);
-       ARTDEF("-op", option_pane_next_cb);
-       ARTDEF("-or", option_rows_cb);
-       ARTDEF("-os", option_scroll_cb);
-       ARTDEF("-oT", option_title_cb);
-       ARTDEF("-ou", option_update_cb);
+       ARTDEF("-oa", gsh_option_app_mode_cb);
+       ARTDEF("-oC", gsh_option_check_commands_cb);
+       ARTDEF("-oc", gsh_option_color_cb);
+       ARTDEF("-oD", gsh_option_no_dummy_cb);
+       ARTDEF("-oE", gsh_option_echoes_cb);
+       ARTDEF("-oe", gsh_option_exits_cb);
+       ARTDEF("-oF", gsh_option_no_base_frame_cb);
+       ARTDEF("-of", gsh_option_framed_labels_cb);
+       ARTDEF("-og", gsh_option_geometry_cb);
+       ARTDEF("-oH", gsh_option_horiz_clock_cb);
+       ARTDEF("-oh", gsh_option_horiz_labels_cb);
+       ARTDEF("-oi", gsh_option_icon_size_cb);
+       ARTDEF("-ol", gsh_option_no_expand_cb);
+       ARTDEF("-oL", gsh_option_expand_cb);
+       ARTDEF("-on", gsh_option_no_decorations_cb);
+       ARTDEF("-op", gsh_option_pane_next_cb);
+       ARTDEF("-or", gsh_option_rows_cb);
+       ARTDEF("-os", gsh_option_scroll_cb);
+       ARTDEF("-oT", gsh_option_title_cb);
+       ARTDEF("-ou", gsh_option_update_cb);
 
        /* Terminal options */
        ARTDEF("-otf", gsh_option_terminal_font_cb);




reply via email to

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