[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Antiright-devel] antiright configure gtkshell/update_manager.c g...
From: |
Jeffrey Bedard |
Subject: |
[Antiright-devel] antiright configure gtkshell/update_manager.c g... |
Date: |
Sun, 20 May 2007 22:45:16 +0000 |
CVSROOT: /sources/antiright
Module name: antiright
Changes by: Jeffrey Bedard <jefbed> 07/05/20 22:45:16
Modified files:
. : configure
gtkshell : update_manager.c updated_options.c
Log message:
Fixed updating sentinel initialization. Automatically start updates on
first updater add.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/antiright/configure?cvsroot=antiright&r1=1.98&r2=1.99
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/update_manager.c?cvsroot=antiright&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/updated_options.c?cvsroot=antiright&r1=1.18&r2=1.19
Patches:
Index: configure
===================================================================
RCS file: /sources/antiright/antiright/configure,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -b -r1.98 -r1.99
--- configure 20 May 2007 18:46:05 -0000 1.98
+++ configure 20 May 2007 22:45:16 -0000 1.99
@@ -90,12 +90,12 @@
fi
fi
-
echo "# Local Build Configuration" > config.mk
echo -n 'Checking for VTE... '
if pkg-config --exists vte; then
echo found
+ DEFS="$DEFS -DHAVE_VTE"
echo 'VTE=1' >> config.mk
else
echo not found
@@ -127,5 +127,4 @@
echo "INSTALL=$INSTALL" >> config.mk
echo "CFLAGS=$CFLAGS" >> config.mk
echo "CC=$CC" >> config.mk
-echo "VTE=$VTE" >> config.mk
Index: gtkshell/update_manager.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/update_manager.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- gtkshell/update_manager.c 20 May 2007 18:29:58 -0000 1.5
+++ gtkshell/update_manager.c 20 May 2007 22:45:16 -0000 1.6
@@ -23,23 +23,6 @@
#include "gtkshell.h"
static void
-gsh_GSHUpdateManager_add(struct GSHUpdateManager * updaters,
- struct GSHUpdatedWidget * item)
-{
-
-#ifdef DEBUG
- ARBUG("gsh_append_updater()");
-
- if (ARPBOOL(updaters) && ARPBOOL(item))
-#endif /* DEBUG */
- updaters->list = g_slist_prepend(updaters->list, item);
-
-#ifdef DEBUG
- ARBUG("end gsh_append_updater()");
-#endif /* DEBUG */
-}
-
-static void
gsh_update_each(gpointer data, gpointer user_data)
{
UNUSED(user_data);
@@ -117,6 +100,25 @@
}
static void
+gsh_GSHUpdateManager_add(struct GSHUpdateManager * updaters,
+ struct GSHUpdatedWidget * item)
+{
+
+#ifdef DEBUG
+ ARBUG("gsh_append_updater()");
+
+ if (ARPBOOL(updaters) && ARPBOOL(item))
+#endif /* DEBUG */
+ updaters->list = g_slist_prepend(updaters->list, item);
+ /* Begin updating, if necessary. */
+ gsh_GSHUpdateManager_start(updaters);
+#ifdef DEBUG
+ ARBUG("end gsh_append_updater()");
+#endif /* DEBUG */
+}
+
+
+static void
gsh_delete_each_updater(gpointer data, gpointer user_data)
{
struct GSHUpdatedWidget * item;
@@ -135,24 +137,28 @@
}
/* Setup method function pointer assignments. */
-#define ASSIGN_METHODS(update)\
-{\
- update->delete=&gsh_delete_GSHUpdateManager;\
- update->add=&gsh_GSHUpdateManager_add;\
- update->start=&gsh_GSHUpdateManager_start;\
+static void
+assign_methods(struct GSHUpdateManager * update)
+{
+ update->delete=&gsh_delete_GSHUpdateManager;
+ update->add=&gsh_GSHUpdateManager_add;
+ update->start=&gsh_GSHUpdateManager_start;
}
/* Setup member data fields. */
-#define INITIALIZE_FIELDS(update)\
-{\
- update->period = 1000;\
- update->list = (GSList *) NULL;\
+static void
+initialize_fields(struct GSHUpdateManager * update)
+{
+ update->period = 1000;
+ update->list = (GSList *) NULL;
+ update->updating=FALSE;
}
-#define SETUP_GSHUPDATEMANAGER(update)\
-{\
- ASSIGN_METHODS(update);\
- INITIALIZE_FIELDS(update);\
+static void
+setup(struct GSHUpdateManager * update)
+{
+ assign_methods(update);
+ initialize_fields(update);
}
struct GSHUpdateManager *
@@ -161,7 +167,7 @@
struct GSHUpdateManager * updater;
updater=xmalloc(sizeof(struct GSHUpdateManager));
- SETUP_GSHUPDATEMANAGER(updater);
+ setup(updater);
return updater;
}
Index: gtkshell/updated_options.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/updated_options.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- gtkshell/updated_options.c 20 May 2007 18:29:58 -0000 1.18
+++ gtkshell/updated_options.c 20 May 2007 22:45:16 -0000 1.19
@@ -26,8 +26,9 @@
add_updater(GSH * gsh, const gint argc, gint * counter,
const gchar ** argv, void (*add_func)(GSH *, const gchar *))
{
- add_func(gsh, argv[*counter+1]);
GSH_COUNT(argc, counter);
+ add_func(gsh, argv[*counter]);
+ if(!gsh->update->updating)
$(gsh->update, start);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Antiright-devel] antiright configure gtkshell/update_manager.c g...,
Jeffrey Bedard <=