gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r2386 - GNUnet/src/conf


From: grothoff
Subject: [GNUnet-SVN] r2386 - GNUnet/src/conf
Date: Fri, 23 Dec 2005 13:11:37 -0800 (PST)

Author: grothoff
Date: 2005-12-23 13:11:34 -0800 (Fri, 23 Dec 2005)
New Revision: 2386

Modified:
   GNUnet/src/conf/Makefile.am
   GNUnet/src/conf/gconf.c
   GNUnet/src/conf/images.c
   GNUnet/src/conf/mconf_checklist.c
   GNUnet/src/conf/mconf_dialog.h
   GNUnet/src/conf/mconf_menubox.c
   GNUnet/src/conf/mconf_textbox.c
Log:
eliminating warnings in conf

Modified: GNUnet/src/conf/Makefile.am
===================================================================
--- GNUnet/src/conf/Makefile.am 2005-12-23 20:37:14 UTC (rev 2385)
+++ GNUnet/src/conf/Makefile.am 2005-12-23 21:11:34 UTC (rev 2386)
@@ -100,7 +100,6 @@
  gconf_interface.c \
  gconf_support.c \
  gconf.c gconf.h \
- images.c  \
  wizard_callbacks.h \
  wizard_interface.h \
  wizard_support.h \

Modified: GNUnet/src/conf/gconf.c
===================================================================
--- GNUnet/src/conf/gconf.c     2005-12-23 20:37:14 UTC (rev 2385)
+++ GNUnet/src/conf/gconf.c     2005-12-23 21:11:34 UTC (rev 2386)
@@ -39,6 +39,14 @@
 
 #include "lkc.h"
 #include "confdata.h"
+
+#define USE_XPM_SINGLE_VIEW 1
+#define USE_XPM_SPLIT_VIEW 1
+#define USE_XPM_TREE_VIEW 1
+#define USE_PLUS_XPM 1
+#define USE_MINUS_XPM 1
+#define USE_XPM_MENU 1
+#define USE_XPM_VOID 1
 #include "images.c"
 
 #include <gtk/gtk.h>
@@ -476,8 +484,11 @@
 static void renderer_edited(GtkCellRendererText * cell,
           const gchar * path_string,
           const gchar * new_text, gpointer user_data);
+
+#if 0
 static void renderer_toggled(GtkCellRendererToggle * cellrenderertoggle,
            gchar * arg1, gpointer user_data);
+#endif
 
 void init_right_tree(void)
 {
@@ -511,8 +522,10 @@
               "inconsistent", COL_BTNINC,
               "visible", COL_BTNVIS,
               "radio", COL_BTNRAD, NULL);
-  /*g_signal_connect(G_OBJECT(renderer), "toggled",
-     G_CALLBACK(renderer_toggled), NULL); */
+#if 0
+  g_signal_connect(G_OBJECT(renderer), "toggled",
+                  G_CALLBACK(renderer_toggled), NULL); 
+#endif
   renderer = gtk_cell_renderer_text_new();
   gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column),
           renderer, FALSE);
@@ -1063,6 +1076,7 @@
     display_tree_part();  /* fixme: keep exp/coll*/
 }
 
+#if 0
 static void renderer_toggled(GtkCellRendererToggle * cell,
            gchar * path_string, gpointer user_data)
 {
@@ -1091,6 +1105,7 @@
       out1:
   gtk_tree_path_free(path);
 }
+#endif
 
 static gint column2index(GtkTreeViewColumn * column)
 {

Modified: GNUnet/src/conf/images.c
===================================================================
--- GNUnet/src/conf/images.c    2005-12-23 20:37:14 UTC (rev 2385)
+++ GNUnet/src/conf/images.c    2005-12-23 21:11:34 UTC (rev 2386)
@@ -30,6 +30,7 @@
  * @author Nils Durner
  */
 
+#ifdef USE_XPM_LOAD
 static const char *xpm_load[] = {
 "22 22 5 1",
 ". c None",
@@ -59,7 +60,9 @@
 "##cccccccccccc##......",
 "###############.......",
 "......................"};
+#endif
 
+#ifdef USE_XPM_SAVE
 static const char *xpm_save[] = {
 "22 22 5 1",
 ". c None",
@@ -89,7 +92,9 @@
 ".#aaa#########bbb#aa#.",
 "..##################..",
 "......................"};
+#endif
 
+#ifdef USE_XPM_BACK
 static const char *xpm_back[] = {
 "22 22 3 1",
 ". c None",
@@ -117,7 +122,9 @@
 "......................",
 "......................",
 "......................"};
+#endif
 
+#ifdef USE_XPM_TREE_VIEW
 static const char *xpm_tree_view[] = {
 "22 22 2 1",
 ". c None",
@@ -144,7 +151,9 @@
 "......########........",
 "......................",
 "......................"};
+#endif
 
+#ifdef USE_XPM_SINGLE_VIEW
 static const char *xpm_single_view[] = {
 "22 22 2 1",
 ". c None",
@@ -171,7 +180,9 @@
 "..........#...........",
 "......................",
 "......................"};
+#endif
 
+#ifdef USE_XPM_SPLIT_VIEW
 static const char *xpm_split_view[] = {
 "22 22 2 1",
 ". c None",
@@ -198,7 +209,9 @@
 "......#......#........",
 "......................",
 "......................"};
+#endif
 
+#ifdef USE_XPM_SYMBOL_NO
 static const char *xpm_symbol_no[] = {
 "12 12 2 1",
 "  c white",
@@ -215,7 +228,9 @@
 " .        . ",
 " .......... ",
 "            "};
+#endif
 
+#ifdef USE_XPM_SYMBOL_MOD
 static const char *xpm_symbol_mod[] = {
 "12 12 2 1",
 "  c white",
@@ -232,7 +247,9 @@
 " .        . ",
 " .......... ",
 "            "};
+#endif
 
+#ifdef USE_XPM_SYMBOL_YES
 static const char *xpm_symbol_yes[] = {
 "12 12 2 1",
 "  c white",
@@ -249,7 +266,9 @@
 " .        . ",
 " .......... ",
 "            "};
+#endif
 
+#ifdef USE_XPM_CHOICE_NO
 static const char *xpm_choice_no[] = {
 "12 12 2 1",
 "  c white",
@@ -266,7 +285,9 @@
 "  ..    ..  ",
 "    ....    ",
 "            "};
+#endif
 
+#ifdef USE_XPM_CHOICE_YES
 static const char *xpm_choice_yes[] = {
 "12 12 2 1",
 "  c white",
@@ -283,7 +304,9 @@
 "  ..    ..  ",
 "    ....    ",
 "            "};
+#endif
 
+#ifdef USE_XPM_MENU
 static const char *xpm_menu[] = {
 "12 12 2 1",
 "  c white",
@@ -300,7 +323,9 @@
 " .        . ",
 " .......... ",
 "            "};
+#endif
 
+#ifdef USE_XPM_MENU_INV
 static const char *xpm_menu_inv[] = {
 "12 12 2 1",
 "  c white",
@@ -317,7 +342,9 @@
 " .......... ",
 " .......... ",
 "            "};
+#endif
 
+#ifdef USE_XPM_MENUBACK
 static const char *xpm_menuback[] = {
 "12 12 2 1",
 "  c white",
@@ -334,7 +361,9 @@
 " .        . ",
 " .......... ",
 "            "};
+#endif
 
+#if USE_XPM_VOID
 static const char *xpm_void[] = {
 "12 12 2 1",
 "  c white",
@@ -351,7 +380,9 @@
 "            ",
 "            ",
 "            "};
+#endif
 
+#if USE_MINUS_XPM
 static const char * minus_xpm[] = {
 "9 9 36 1",
 "   c None",
@@ -399,7 +430,9 @@
 "+_:<[}|1+",
 "+2345567+",
 ".+++++++."};
+#endif
 
+#if USE_PLUS_XPM
 static const char * plus_xpm[] = {
 "9 9 34 1",
 "   c None",
@@ -446,3 +479,4 @@
 "+|123345+",
 ".+++++++."};
 
+#endif

Modified: GNUnet/src/conf/mconf_checklist.c
===================================================================
--- GNUnet/src/conf/mconf_checklist.c   2005-12-23 20:37:14 UTC (rev 2385)
+++ GNUnet/src/conf/mconf_checklist.c   2005-12-23 21:11:34 UTC (rev 2386)
@@ -149,7 +149,7 @@
             choice = i;
     }
 
-    max_choice = MIN (list_height, item_no);
+    max_choice = GNUNET_MIN (list_height, item_no);
 
     /* center dialog box on screen */
     x = (COLS - width) / 2;
@@ -202,7 +202,7 @@
     /* Find length of longest item in order to center checklist */
     check_x = 0;
     for (i = 0; i < item_no; i++)
-      check_x = MAX (check_x, + (int) strlen (items[i]->name) + 4);
+      check_x = GNUNET_MAX (check_x, + (int) strlen (items[i]->name) + 4);
 
     check_x = (list_width - check_x) / 2;
     item_x = check_x + 4;

Modified: GNUnet/src/conf/mconf_dialog.h
===================================================================
--- GNUnet/src/conf/mconf_dialog.h      2005-12-23 20:37:14 UTC (rev 2385)
+++ GNUnet/src/conf/mconf_dialog.h      2005-12-23 21:11:34 UTC (rev 2386)
@@ -64,8 +64,8 @@
 #define TAB 9
 #define MAX_LEN 2048
 #define BUF_SIZE (10*1024)
-#define MIN(x,y) (x < y ? x : y)
-#define MAX(x,y) (x > y ? x : y)
+#define GNUNET_MIN(x,y) (x < y ? x : y)
+#define GNUNET_MAX(x,y) (x > y ? x : y)
 
 
 #ifndef ACS_ULCORNER

Modified: GNUnet/src/conf/mconf_menubox.c
===================================================================
--- GNUnet/src/conf/mconf_menubox.c     2005-12-23 20:37:14 UTC (rev 2385)
+++ GNUnet/src/conf/mconf_menubox.c     2005-12-23 21:11:34 UTC (rev 2386)
@@ -179,7 +179,7 @@
     WINDOW *dialog, *menu;
     FILE *f;
 
-    max_choice = MIN (menu_height, item_no);
+    max_choice = GNUNET_MIN (menu_height, item_no);
 
     /* center dialog box on screen */
     x = (COLS - width) / 2;
@@ -236,7 +236,7 @@
      */
     item_x = 0;
     for (i = 0; i < item_no; i++) {
-      item_x = MAX (item_x, MIN(menu_width, (int) strlen (items[i]->name) + 
2));
+      item_x = GNUNET_MAX (item_x, GNUNET_MIN(menu_width, (int) strlen 
(items[i]->name) + 2));
        if (choice_type == items[i]->type && choice_ptr == items[i]->data)
                choice = i;
     }
@@ -346,7 +346,7 @@
                                max_choice-1, FALSE,
                                (items[scroll_i + max_choice - 1]->type != 
':'));
                 } else
-                    choice = MIN(choice+1, max_choice-1);
+                    choice = GNUNET_MIN(choice+1, max_choice-1);
 
            } else if (key == KEY_PPAGE) {
                scrollok (menu, TRUE);

Modified: GNUnet/src/conf/mconf_textbox.c
===================================================================
--- GNUnet/src/conf/mconf_textbox.c     2005-12-23 20:37:14 UTC (rev 2385)
+++ GNUnet/src/conf/mconf_textbox.c     2005-12-23 21:11:34 UTC (rev 2386)
@@ -483,10 +483,10 @@
     char *line;
 
     line = get_line ();
-    line += MIN ((int)strlen (line), hscroll); /* Scroll horizontally */
+    line += GNUNET_MIN ((int)strlen (line), hscroll);  /* Scroll horizontally 
*/
     wmove (win, row, 0);       /* move cursor to correct line */
     waddch (win, ' ');
-    waddnstr (win, line, MIN ((int)strlen (line), width - 2));
+    waddnstr (win, line, GNUNET_MIN ((int)strlen (line), width - 2));
 
     getyx (win, y, x);
     /* Clear 'residue' of previous line */





reply via email to

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