rpms/gnotime/devel gnotime-desktop.patch, NONE, 1.1 gnotime-gtkhtml3-qof.patch, NONE, 1.1 gnotime-help-error.patch, NONE, 1.1 gnotime-help.patch, NONE, 1.1 gnotime-idle.patch, NONE, 1.1 gnotime-popup-menus.patch, NONE, 1.1 gnotime-qof-include.patch, NONE, 1.1 gnotime-wordwrap.patch, NONE, 1.1 gnotime.spec, NONE, 1.1 gtt_restartwin.png, NONE, 1.1 gtt_startprojwin.png, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Ville Skytta (scop) fedora-extras-commits at redhat.com
Thu Dec 16 17:34:09 UTC 2004


Author: scop

Update of /cvs/extras/rpms/gnotime/devel
In directory cvs.fedora.redhat.com:/tmp/cvs-serv8371/devel

Modified Files:
	.cvsignore sources 
Added Files:
	gnotime-desktop.patch gnotime-gtkhtml3-qof.patch 
	gnotime-help-error.patch gnotime-help.patch gnotime-idle.patch 
	gnotime-popup-menus.patch gnotime-qof-include.patch 
	gnotime-wordwrap.patch gnotime.spec gtt_restartwin.png 
	gtt_startprojwin.png 
Log Message:
auto-import gnotime-2.2.1-0.fdr.5.2 on branch devel from gnotime-2.2.1-0.fdr.5.2.src.rpm

gnotime-desktop.patch:

--- NEW FILE gnotime-desktop.patch ---
Index: gnotime.desktop.in
===================================================================
RCS file: /cvsroot/gttr/gnotime/gnotime.desktop.in,v
retrieving revision 1.5
diff -u -r1.5 gnotime.desktop.in
--- gnotime.desktop.in	19 Mar 2003 16:20:36 -0000	1.5
+++ gnotime.desktop.in	20 Jul 2004 15:46:04 -0000
@@ -4,9 +4,10 @@
 _Comment=To-Do List Organizer, Diary and Billing System
 Exec=gnotime
 Icon=gnome-cromagnon.png
-Terminal=0
+Terminal=false
 Type=Application
-Categories=Application;Office
+Categories=Application;Office;ProjectManagement;GNOME;
+StartupNotify=true
 X-GNOME-Bugzilla-Bugzilla=GNOME
 X-GNOME-Bugzilla-Product=gnome-utils
 X-GNOME-Bugzilla-Component=gtt

gnotime-gtkhtml3-qof.patch:

--- NEW FILE gnotime-gtkhtml3-qof.patch ---
Index: configure.in
===================================================================
RCS file: /cvsroot/gttr/gnotime/configure.in,v
retrieving revision 1.44
diff -u -r1.44 configure.in
--- configure.in	23 May 2004 21:15:00 -0000	1.44
+++ configure.in	20 Jul 2004 18:36:02 -0000
@@ -50,6 +50,8 @@
 LIBGTKHTML_REQUIRED=3.0.0
 LIBXML2_REQUIRED=2.0.0
 SCROLLKEEPER_BUILD_REQUIRED=0.3.5
+LIBQOF_REQUIRED_MIN=0.5.0
+LIBQOF_REQUIRED_MAX=0.5.0
 
 dnl *******************************
 dnl Guile checks
@@ -167,7 +169,11 @@
 dnl gtkhtml
 dnl *******************************
 
-PKG_CHECK_MODULES(LIBGTKHTML, libgtkhtml-3.1 >= $LIBGTKHTML_REQUIRED)
+if $PKG_CONFIG --exists libgtkhtml-3.1; then
+  PKG_CHECK_MODULES(LIBGTKHTML, libgtkhtml-3.1 >= $LIBGTKHTML_REQUIRED)
+else
+  PKG_CHECK_MODULES(LIBGTKHTML, libgtkhtml-3.0 >= $LIBGTKHTML_REQUIRED)
+fi
 AC_SUBST(LIBGTKHTML_CFLAGS)
 AC_SUBST(LIBGTKHTML_LIBS)
 
@@ -182,6 +188,42 @@
 AC_SUBST(LIBXML2_LIBS)
 
 dnl *****************************
+dnl libqof
+dnl *****************************
+
+AC_ARG_WITH(system-qof,
+AC_HELP_STRING([--with-system-qof],
+[use installed libqof rather than the bundled one.  If not specified, configure will use the system qof if installed, otherwise its own.]),
+
+[
+if test x$withval = "xyes"; then
+	PKG_CHECK_MODULES(LIBQOF, qof-0 >= $LIBQOF_REQUIRED_MIN qof-0 <= $LIBQOF_REQUIRED_MAX)
+	qofbuild=no
+else
+	AC_MSG_NOTICE([Using internal libqof])
+	LIBQOF_CFLAGS='-I$(top_srcdir)/lib -I$(top_srcdir)/lib/qof'
+	LIBQOF_LIBS='$(top_builddir)/lib/qof/libqof.la $(top_builddir)/lib/libqofsql/libqofsql.la'
+	qofbuild=yes
+fi
+],
+[
+if $PKG_CONFIG --exists "qof-0 >= $LIBQOF_REQUIRED_MIN qof-0 <= $LIBQOF_REQUIRED_MAX"; then
+	PKG_CHECK_MODULES(LIBQOF, qof-0 >= $LIBQOF_REQUIRED_MIN qof-0 <= $LIBQOF_REQUIRED_MAX)
+	qofbuild=no
+else
+	AC_MSG_NOTICE([Using internal libqof])
+	LIBQOF_CFLAGS='-I$(top_srcdir)/lib -I$(top_srcdir)/lib/qof'
+	LIBQOF_LIBS='$(top_builddir)/lib/qof/libqof.la $(top_builddir)/lib/libqofsql/libqofsql.la'
+	qofbuild=yes
+fi
+])
+
+AM_CONDITIONAL(QOFBUILD, test x$qofbuild = xyes)
+
+AC_SUBST(LIBQOF_CFLAGS)
+AC_SUBST(LIBQOF_LIBS)
+
+dnl *****************************
 dnl scrollkeeper
 dnl *****************************
 dnl To substitute into the gnotime.spec
Index: src/Makefile.am
===================================================================
RCS file: /cvsroot/gttr/gnotime/src/Makefile.am,v
retrieving revision 1.28
diff -u -r1.28 Makefile.am
--- src/Makefile.am	24 Apr 2004 00:39:56 -0000	1.28
+++ src/Makefile.am	20 Jul 2004 18:36:02 -0000
@@ -91,11 +91,10 @@
 	${LIBGNOMEVFS_CFLAGS} \
 	${LIBGTKHTML_CFLAGS}  \
 	${LIBGLADE_CFLAGS}    \
+	${LIBQOF_CFLAGS}      \
 	${LIBXML2_CFLAGS}
 
 INCLUDES =                                   \
-	-I../lib                                  \
-	-I../lib/qof                              \
 	-I$(includedir)                           \
 	-DGNOMELOCALEDIR=\""$(datadir)/locale"\"  \
 	-DGTTGLADEDIR=\""$(datadir)/gnotime"\"    \
@@ -109,8 +108,7 @@
 						 
 gnotime_LDADD =         \
 	$(GNOTIME_LIBS)      \
-	../lib/qof/libqof.la \
-	../lib/libqofsql/libqofsql.la \
+	$(LIBQOF_LIBS)	     \
 	$(LIBGLADE_LIBS)     \
 	$(LIBGTKHTML_LIBS)   \
 	${LIBGNOMEVFS_LIBS}  \
@@ -125,7 +123,3 @@
 	down.xpm		\
 	left.xpm		\
 	design.txt
-
-
-                                                                                
-
Index: lib/libqofsql/Makefile.am
===================================================================
RCS file: /cvsroot/gttr/gnotime/lib/libqofsql/Makefile.am,v
retrieving revision 1.1
diff -u -r1.1 Makefile.am
--- lib/libqofsql/Makefile.am	9 Apr 2004 04:58:52 -0000	1.1
+++ lib/libqofsql/Makefile.am	20 Jul 2004 18:36:02 -0000
@@ -1,6 +1,9 @@
 ## Process this file with automake to produce Makefile.in
 
+if QOFBUILD
 lib_LTLIBRARIES = libqofsql.la
+noinst_PROGRAMS = sql_parse_test
+endif
 
 libqofsql_la_SOURCES = \
 	parser.c \
@@ -15,9 +18,11 @@
 	sql_tree.h
 
 qofsqlincludedir = ${pkgincludedir}
+if QOFBUILD
 qofsqlinclude_HEADERS = sql_parser.h
-
-noinst_PROGRAMS = sql_parse_test
+else
+noinst_HEADERS = sql_parser.h
+endif
 
 EXTRA_DIST =       \
 	.cvsignore      \
Index: lib/qof/Makefile.am
===================================================================
RCS file: /cvsroot/gttr/gnotime/lib/qof/Makefile.am,v
retrieving revision 1.7
diff -u -r1.7 Makefile.am
--- lib/qof/Makefile.am	3 May 2004 03:46:59 -0000	1.7
+++ lib/qof/Makefile.am	20 Jul 2004 18:36:03 -0000
@@ -1,7 +1,8 @@
 
 # pkglib_LTLIBRARIES = libqof.la
-
+if QOFBUILD
 lib_LTLIBRARIES = libqof.la
+endif
 
 libqof_la_SOURCES =  \
    gnc-date.c        \
@@ -28,7 +29,7 @@
    qofsql.c
 
 qofincludedir = ${pkgincludedir}
-qofinclude_HEADERS = \
+public_headers = \
    gnc-date.h        \
    gnc-engine-util.h \
    gnc-numeric.h     \
@@ -67,7 +68,14 @@
    qofquerycore-p.h   \
    qofsession-p.h
 
-   
+if QOFBUILD
+qofinclude_HEADERS = \
+	$(public_headers)
+else
+noinst_HEADERS += \
+	$(public_headers)
+endif
+
 EXTRA_DIST =          \
 	README             \
    .cvsignore
@@ -83,6 +91,3 @@
    -I$(includedir)             \
    -DPREFIX=\""$(prefix)"\"    \
    -DDATADIR=\""$(datadir)"\" 
-                   
-
-

gnotime-help-error.patch:

--- NEW FILE gnotime-help-error.patch ---
Index: src/dialog.c
===================================================================
RCS file: /cvsroot/gttr/gnotime/src/dialog.c,v
retrieving revision 1.11
diff -u -r1.11 dialog.c
--- src/dialog.c	20 Aug 2004 23:04:32 -0000	1.11
+++ src/dialog.c	28 Nov 2004 04:30:50 -0000
@@ -35,7 +35,7 @@
 	{
 		GtkWidget *mb;
 		mb = gtk_message_dialog_new (
-		         GTK_WINDOW (widget),
+		         GTK_IS_WINDOW(widget) ? GTK_WINDOW (widget) : NULL,
 		         GTK_DIALOG_MODAL,
 		         GTK_MESSAGE_ERROR,
 		         GTK_BUTTONS_CLOSE,

gnotime-help.patch:

--- NEW FILE gnotime-help.patch ---
? gnotime-help.patch
Index: doc/C/gnotime.xml
===================================================================
RCS file: /cvsroot/gttr/gnotime/doc/C/gnotime.xml,v
retrieving revision 1.2
diff -u -r1.2 gnotime.xml
--- doc/C/gnotime.xml	13 Apr 2004 16:55:53 -0000	1.2
+++ doc/C/gnotime.xml	7 Aug 2004 21:39:45 -0000
@@ -999,6 +999,41 @@
         press <guibutton>Cancel</guibutton>.
       </para>
     </sect2>      
+<sect2 id="idletimer">
+  <title>The Idle Timer Diaogs</title>
+  <para>When <application>GNOME Time Tracker</application> detects that you
+    have not entered anything into your computer for a period of time
+    (configured under <xref linkend="preferences" />), it stops the timer
+    and pops up a dialog asking if you want to restart the timer.</para>
+  <figure id="restarttimer" xreflabel="Restart Timer Dialog">
+    <title>Restart Timer Dialog</title>
+    <screenshot>
+      <screeninfo>Restart Timer Dialog</screeninfo>
+      <graphic fileref="figures/gtt_restartwin.png" />
+    </screenshot>
+  </figure>
+  <para>If you want the time credited to the project anyway (If you had to
+    make a call related to the project, for instance,) Gnotime provides a
+    slider which can be set to the time you want to credit the project with.
+    Pressing <guibutton>Yes</guibutton> credits the project and restarts the
+    timer.  Pressing <guibutton>No</guibutton> halts the timer.</para>
+  
+  <para>Similarly, when there is no project running, <application>GNOME Timer
+    Tracker</application> pops up a dialog asking if you want to start
+    one.</para>
+  <figure id="starttimer" xreflabel="Start Timer Dialog">
+    <title>Start Project Timer Dialog</title>
+    <screenshot>
+      <screeninfo>Restart Timer Dialog</screeninfo>
+      <graphic fileref="figures/gtt_startprojwin.png" />
+    </screenshot>
+  </figure>
+  <para>It provides a dropdown list of your projects which you can choose to
+    select as well as a place to enter any time you want credited to the
+    timer.  If you choose to restart the timer with a project, press the
+    <guibutton>Execute</guibutton> button.  Otherwise,
+    <guibutton>Cancel</guibutton> is what you want.</para>
+</sect2>
 </sect1>
 
 
@@ -1115,18 +1150,3 @@
   </para>
  </sect1>
 </article>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Index: src/active-dialog.c
===================================================================
RCS file: /cvsroot/gttr/gnotime/src/active-dialog.c,v
retrieving revision 1.6
diff -u -r1.6 active-dialog.c
--- src/active-dialog.c	7 Aug 2003 15:12:52 -0000	1.6
+++ src/active-dialog.c	7 Aug 2004 21:39:45 -0000
@@ -32,6 +32,7 @@
 #include "proj.h"
 #include "proj-query.h"
 #include "util.h"
+#include "dialog.h"
 
 
 extern int config_idle_timeout;
@@ -43,6 +44,7 @@
 	GtkDialog   *dlg;
 	GtkButton   *yes_btn;
 	GtkButton   *no_btn;
+    GtkButton   *help_btn;
 	GtkLabel    *active_label;
 	GtkLabel    *credit_label;
 	GtkOptionMenu  *project_menu;
@@ -55,6 +57,14 @@
 /* =========================================================== */
 
 static void
+dialog_help (GObject *obj, GttActiveDialog *dlg)
+{
+    gtt_help_popup (GTK_WIDGET(dlg->dlg), "idletimer");
+}
+
+/* =========================================================== */
+
+static void
 dialog_close (GObject *obj, GttActiveDialog *dlg)
 {
 	dlg->dlg = NULL;
@@ -151,6 +161,7 @@
 
 	id->yes_btn = GTK_BUTTON(glade_xml_get_widget (gtxml, "yes button"));
 	id->no_btn  = GTK_BUTTON(glade_xml_get_widget (gtxml, "no button"));
+    id->help_btn = GTK_BUTTON(glade_xml_get_widget (gtxml, "helpbutton1"));
 	id->active_label = GTK_LABEL (glade_xml_get_widget (gtxml, "active label"));
 	id->credit_label = GTK_LABEL (glade_xml_get_widget (gtxml, "credit label"));
 	w = glade_xml_get_widget (gtxml, "project option menu");
@@ -165,6 +176,9 @@
 	g_signal_connect(G_OBJECT(id->no_btn), "clicked",
 	          G_CALLBACK(dialog_kill), id);
 
+	g_signal_connect(G_OBJECT(id->help_btn), "clicked",
+	          G_CALLBACK(dialog_help), id);
+
 }
 
 /* =========================================================== */
Index: src/dialog.c
===================================================================
RCS file: /cvsroot/gttr/gnotime/src/dialog.c,v
retrieving revision 1.10
diff -u -r1.10 dialog.c
--- src/dialog.c	25 Apr 2004 23:01:12 -0000	1.10
+++ src/dialog.c	7 Aug 2004 21:39:45 -0000
@@ -29,7 +29,7 @@
 {
 	GError *err = NULL;
 	char * section = data;
-	if (NULL == section) section = "";
+	if ("" == section) section = NULL;
 	gnome_help_display ("gnotime", section, &err);
 	if (err)
 	{
Index: src/idle-dialog.c
===================================================================
RCS file: /cvsroot/gttr/gnotime/src/idle-dialog.c,v
retrieving revision 1.12
diff -u -r1.12 idle-dialog.c
--- src/idle-dialog.c	4 May 2004 18:23:25 -0000	1.12
+++ src/idle-dialog.c	7 Aug 2004 21:39:46 -0000
@@ -28,6 +28,7 @@
 #include "ctree-gnome2.h"
 #include "cur-proj.h"
 #include "idle-dialog.h"
+#include "dialog.h"
 #include "idle-timer.h"
 #include "proj.h"
 #include "util.h"
@@ -41,6 +42,7 @@
 	GtkDialog   *dlg;
 	GtkButton   *yes_btn;
 	GtkButton   *no_btn;
+    GtkButton   *help_btn;
 	GtkLabel    *idle_label;
 	GtkLabel    *credit_label;
 	GtkLabel    *time_label;
@@ -56,6 +58,14 @@
 /* =========================================================== */
 
 static void
+help_cb (GObject *obj, GttIdleDialog *dlg)
+{
+    gtt_help_popup (GTK_WIDGET(dlg->dlg), "idletimer");
+}
+
+/* =========================================================== */
+
+static void
 dialog_close (GObject *obj, GttIdleDialog *dlg)
 {
 	dlg->dlg = NULL;
@@ -272,6 +282,7 @@
 
 	id->yes_btn = GTK_BUTTON(glade_xml_get_widget (gtxml, "yes button"));
 	id->no_btn  = GTK_BUTTON(glade_xml_get_widget (gtxml, "no button"));
+    id->help_btn = GTK_BUTTON(glade_xml_get_widget (gtxml, "helpbutton1"));
 	id->idle_label = GTK_LABEL (glade_xml_get_widget (gtxml, "idle label"));
 	id->credit_label = GTK_LABEL (glade_xml_get_widget (gtxml, "credit label"));
 	id->time_label = GTK_LABEL (glade_xml_get_widget (gtxml, "time label"));
@@ -286,6 +297,9 @@
 	g_signal_connect(G_OBJECT(id->no_btn), "clicked",
 	          G_CALLBACK(dialog_kill), id);
 
+    g_signal_connect(G_OBJECT(id->help_btn), "clicked",
+            G_CALLBACK(help_cb), id);
+
 	g_signal_connect(G_OBJECT(id->scale), "value_changed",
 	          G_CALLBACK(value_changed), id);
 
Index: src/journal.c
===================================================================
RCS file: /cvsroot/gttr/gnotime/src/journal.c,v
retrieving revision 1.54
diff -u -r1.54 journal.c
--- src/journal.c	7 May 2004 16:03:54 -0000	1.54
+++ src/journal.c	7 Aug 2004 21:39:47 -0000
@@ -1225,7 +1225,7 @@
 	wig->publish_entry = GTK_ENTRY(glade_xml_get_widget (glxml, "url entry"));
 
 	glade_xml_signal_connect_data (glxml, "on_pub_help_clicked",
-	        GTK_SIGNAL_FUNC (gtt_help_popup), "gnotime.xml");
+	        GTK_SIGNAL_FUNC (gtt_help_popup), NULL);
 	  
 	glade_xml_signal_connect_data (glxml, "on_pub_cancel_clicked",
 	        GTK_SIGNAL_FUNC (on_pub_cancel_clicked_cb), wig);
Index: src/prefs.c
===================================================================
RCS file: /cvsroot/gttr/gnotime/src/prefs.c,v
retrieving revision 1.13
diff -u -r1.13 prefs.c
--- src/prefs.c	22 Apr 2004 02:06:10 -0000	1.13
+++ src/prefs.c	7 Aug 2004 21:39:48 -0000
@@ -733,7 +733,7 @@
 
 	gtk_signal_connect(GTK_OBJECT(dlg->dlg), "help",
 			   GTK_SIGNAL_FUNC(help_cb),
-			   "gnotime.xml#preferences");
+			   "preferences");
 
 	gtk_signal_connect(GTK_OBJECT(dlg->dlg), "apply",
 			   GTK_SIGNAL_FUNC(prefs_set), dlg);
Index: src/props-proj.c
===================================================================
RCS file: /cvsroot/gttr/gnotime/src/props-proj.c,v
retrieving revision 1.14
diff -u -r1.14 props-proj.c
--- src/props-proj.c	25 Apr 2004 23:01:12 -0000	1.14
+++ src/props-proj.c	7 Aug 2004 21:39:49 -0000
@@ -341,7 +341,7 @@
 
 	gtk_signal_connect(GTK_OBJECT(dlg->dlg), "help",
 	                   GTK_SIGNAL_FUNC(help_cb),
-			             "gnotime.xml#preferences");
+			             "properties");
 
 	gtk_signal_connect(GTK_OBJECT(dlg->dlg), "apply",
 			   GTK_SIGNAL_FUNC(prop_set), dlg);
Index: src/props-task.c
===================================================================
RCS file: /cvsroot/gttr/gnotime/src/props-task.c,v
retrieving revision 1.14
diff -u -r1.14 props-task.c
--- src/props-task.c	28 Apr 2004 07:07:29 -0000	1.14
+++ src/props-task.c	7 Aug 2004 21:39:49 -0000
@@ -270,7 +270,7 @@
 	dlg->dlg = GTK_DIALOG (glade_xml_get_widget (gtxml,  "Task Properties"));
 
 	glade_xml_signal_connect_data (gtxml, "on_help_button_clicked",
-		GTK_SIGNAL_FUNC (gtt_help_popup), "gnotime.xml#preferences");
+		GTK_SIGNAL_FUNC (gtt_help_popup), "properties");
 
 	glade_xml_signal_connect_data (gtxml, "on_ok_button_clicked",
 		GTK_SIGNAL_FUNC (close_cb), dlg);

gnotime-idle.patch:

--- NEW FILE gnotime-idle.patch ---
Index: src/idle-timer.c
===================================================================
RCS file: /cvsroot/gttr/gnotime/src/idle-timer.c,v
retrieving revision 1.4
diff -u -r1.4 idle-timer.c
--- src/idle-timer.c	15 Apr 2004 14:24:09 -0000	1.4
+++ src/idle-timer.c	19 Jul 2004 18:25:34 -0000
@@ -553,6 +553,9 @@
 proc_interrupts_activity_p (IdleTimeout *si)
 {
   static FILE *f0 = 0;
+  static Bool need_dup = True;
+  static char *kbd_str = NULL;
+  static char *ptr_str = NULL;
   FILE *f1 = 0;
   int fd;
   static char last_kbd_line[255] = { 0, };
@@ -577,27 +580,32 @@
   if (f0 == (FILE *) -1)	    /* means we got an error initializing. */
     return False;
 
-  fd = dup (fileno (f0));
-  if (fd < 0)
+  if (need_dup)
     {
-      char buf[255];
-      sprintf(buf, "%s: could not dup() the %s fd", PACKAGE, PROC_INTERRUPTS);
-      perror (buf);
-      goto FAIL;
-    }
-
-  f1 = fdopen (fd, "r");
-  if (!f1)
+      fd = dup (fileno (f0));
+      if (fd < 0)
+        {
+          char buf[255];
+          sprintf(buf, "%s: could not dup() the %s fd", PACKAGE, PROC_INTERRUPTS);
+          perror (buf);
+          goto FAIL;
+        }
+    f1 = fdopen (fd, "r");
+    if (!f1)
+      {
+        char buf[255];
+        sprintf(buf, "%s: could not fdopen() the %s fd", PACKAGE,
+                PROC_INTERRUPTS);
+        perror (buf);
+        goto FAIL;
+      }
+    } 
+  else
     {
-      char buf[255];
-      sprintf(buf, "%s: could not fdopen() the %s fd", PACKAGE,
-              PROC_INTERRUPTS);
-      perror (buf);
-      goto FAIL;
+      f1 = f0;
     }
-
-  /* Actually, I'm unclear on why this fseek() is necessary, given the timing
-     of the dup() above, but it is. */
+  /* fseek() to the beginning of the file even if we did the above dup.
+     I'm unclear on why it's necessary in the dup case, but it is. */
   if (fseek (f1, 0, SEEK_SET) != 0)
     {
       char buf[255];
@@ -606,39 +614,108 @@
       goto FAIL;
     }
 
-  /* Now read through the pseudo-file until we find the "keyboard" line. */
-
-  while (fgets (new_line, sizeof(new_line)-1, f1))
+  if (kbd_str == NULL)
     {
-      if (!got_kbd && strstr (new_line, "keyboard"))
+      /* Initial run through */
+      /* Determine what our search string will be. */
+      while (fgets (new_line, sizeof(new_line)-1, f1))
         {
-          kbd_diff = (*last_kbd_line && !!strcmp (new_line, last_kbd_line));
-          strcpy (last_kbd_line, new_line);
-          got_kbd = True;
+          if (strchr (new_line, ','))
+            {
+              /* Ignore any line that has a comma on it: this is because
+               * a setup like this:
+               *
+               *      12:      930935        XT-PIC  usb-uhci, PS/2 Mouse
+               *
+               * is really bad news.  It *looks* like we can note mouse
+               * activity from that line, but really the interrupt gets
+               * fired any time a USB device has activity!  So we have to
+               * ignore any shared IRQs.
+               */
+            }
+          else if (!got_kbd && strstr(new_line, "keyboard"))
+            {
+              kbd_str = "keyboard";
+              need_dup = True;
+              got_kbd = True;
+              strcpy (last_kbd_line, new_line);
+            }
+          else if (!got_kbd && strstr(new_line, "PS/2 Mouse"))
+            {
+              ptr_str = "PS/2 Mouse";
+              need_dup = True;
+              got_ptr = True;
+              strcpy (last_ptr_line, new_line);
+            }
+          else if (!got_kbd && strstr(new_line, "i8042"))
+            {
+              if (strstr(new_line, " 1:"))
+                {
+                  kbd_str = " 1:";
+                  need_dup = False;
+                  got_kbd = True;
+                  strcpy (last_kbd_line, new_line);
+                }
+              else if (strstr(new_line, " 12:"))
+                {
+                  ptr_str = " 12:";
+                  need_dup = False;
+                  got_ptr = True;
+                  strcpy (last_ptr_line, new_line);
+                }
+            }
+          if (got_kbd && got_ptr)
+              break;
         }
-      else if (!got_ptr && strstr (new_line, "PS/2 Mouse"))
+      if (kbd_str == NULL && ptr_str == NULL)
         {
-          ptr_diff = (*last_ptr_line && !!strcmp (new_line, last_ptr_line));
-          strcpy (last_ptr_line, new_line);
-          got_ptr = True;
+          /* If we got here, we didn't find either an entry for keyboards or
+             mice in the file at all. */
+          fprintf (stderr, "%s: no keyboard or mouse data in %s?\n",
+                   PACKAGE, PROC_INTERRUPTS);
+          goto FAIL;
+        }
+      if (kbd_str == NULL) {
+          kbd_str = "NoneNoneNone";
+      }
+      if (ptr_str == NULL) {
+          ptr_str = "NoneNoneNone";
+      }
+      if (need_dup == False) {
+          fclose(f1);
+      }
+    }
+  else
+    {
+      /* Regular */
+      while (fgets (new_line, sizeof(new_line)-1, f1))
+        {
+          if (!got_kbd && strstr (new_line, kbd_str))
+            {
+              kbd_diff = (*last_kbd_line && !!strcmp (new_line, last_kbd_line));
+              strcpy (last_kbd_line, new_line);
+              got_kbd = True;
+            }
+          else if (!got_ptr && strstr (new_line, ptr_str))
+            {
+              ptr_diff = (*last_ptr_line && !!strcmp (new_line, last_ptr_line));
+              strcpy (last_ptr_line, new_line);
+              got_ptr = True;
+            }
+    
+          if (got_kbd && got_ptr)
+            break;
         }
-
-      if (got_kbd && got_ptr)
-        break;
     }
 
   if (got_kbd || got_ptr)
     {
-      fclose (f1);
+      if (need_dup)
+          fclose (f1);
       return (kbd_diff || ptr_diff);
     }
 
 
-  /* If we got here, we didn't find either a "keyboard" or a "PS/2 Mouse"
-     line in the file at all. */
-  fprintf (stderr, "%s: no keyboard or mouse data in %s?\n",
-           PACKAGE, PROC_INTERRUPTS);
-
  FAIL:
   if (f1)
     fclose (f1);

gnotime-popup-menus.patch:

--- NEW FILE gnotime-popup-menus.patch ---
Index: src/menus.c
===================================================================
RCS file: /cvsroot/gttr/gnotime/src/menus.c,v
retrieving revision 1.27
diff -u -r1.27 menus.c
--- src/menus.c	18 May 2004 19:51:37 -0000	1.27
+++ src/menus.c	1 Oct 2004 02:23:09 -0000
@@ -198,14 +198,15 @@
 
 
 
-GtkWidget *
+GtkMenuShell *
 menus_get_popup(void)
 {
-	static GtkWidget *menu = NULL;
+	static GtkMenuShell *menu = NULL;
 
 	if (menu) return menu;
-
-	menu = gnome_popup_menu_new(menu_popup);
+    
+	menu = (GtkMenuShell *)gtk_menu_new();
+	gnome_app_fill_menu(menu, menu_popup, NULL, TRUE, 0);
 	return menu;
 }
 
Index: src/menus.h
===================================================================
RCS file: /cvsroot/gttr/gnotime/src/menus.h,v
retrieving revision 1.4
diff -u -r1.4 menus.h
--- src/menus.h	13 Nov 2003 01:36:21 -0000	1.4
+++ src/menus.h	1 Oct 2004 02:23:09 -0000
@@ -21,7 +21,7 @@
 
 #include <gnome.h>
 
-GtkWidget *menus_get_popup(void);
+GtkMenuShell *menus_get_popup(void);
 void menus_create(GnomeApp *app);
 void menus_set_states(void);
 

gnotime-qof-include.patch:

--- NEW FILE gnotime-qof-include.patch ---
Index: src/active-dialog.c
===================================================================
RCS file: /cvsroot/gttr/gnotime/src/active-dialog.c,v
retrieving revision 1.6
diff -u -r1.6 active-dialog.c
--- src/active-dialog.c	7 Aug 2003 15:12:52 -0000	1.6
+++ src/active-dialog.c	20 Jul 2004 12:03:43 -0000
@@ -22,7 +22,7 @@
 #include <gnome.h>
 #include <string.h>
 
-#include <gnc-date.h>
+#include <qof/gnc-date.h>
 
 #include "ctree.h"
 #include "ctree-gnome2.h"
Index: src/ctree.c
===================================================================
RCS file: /cvsroot/gttr/gnotime/src/ctree.c,v
retrieving revision 1.35
diff -u -r1.35 ctree.c
--- src/ctree.c	25 Apr 2004 23:43:47 -0000	1.35
+++ src/ctree.c	20 Jul 2004 12:03:45 -0000
@@ -22,7 +22,7 @@
 #include <config.h>
 #include <gnome.h>
 
-#include <gnc-date.h>
+#include <qof/gnc-date.h>
 
 #include "app.h"
 #include "ctree.h"
Index: src/ghtml-deprecated.c
===================================================================
RCS file: /cvsroot/gttr/gnotime/src/ghtml-deprecated.c,v
retrieving revision 1.7
diff -u -r1.7 ghtml-deprecated.c
--- src/ghtml-deprecated.c	3 Apr 2004 01:41:19 -0000	1.7
+++ src/ghtml-deprecated.c	20 Jul 2004 12:03:46 -0000
@@ -24,7 +24,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include <gnc-date.h>
+#include <qof/gnc-date.h>
 
 #include "app.h"
 #include "ctree.h"
Index: src/ghtml.c
===================================================================
RCS file: /cvsroot/gttr/gnotime/src/ghtml.c,v
retrieving revision 1.71
diff -u -r1.71 ghtml.c
--- src/ghtml.c	18 May 2004 19:51:15 -0000	1.71
+++ src/ghtml.c	20 Jul 2004 12:03:48 -0000
@@ -27,7 +27,7 @@
 #include <string.h>
 #include <libgnomevfs/gnome-vfs.h>
 
-#include <qof.h>
+#include <qof/qof.h>
 
 #include "app.h"
 #include "ctree.h"
Index: src/idle-dialog.c
===================================================================
RCS file: /cvsroot/gttr/gnotime/src/idle-dialog.c,v
retrieving revision 1.12
diff -u -r1.12 idle-dialog.c
--- src/idle-dialog.c	4 May 2004 18:23:25 -0000	1.12
+++ src/idle-dialog.c	20 Jul 2004 12:03:48 -0000
@@ -22,7 +22,7 @@
 #include <gnome.h>
 #include <string.h>
 
-#include <gnc-date.h>
+#include <qof/gnc-date.h>
 
 #include "ctree.h"
 #include "ctree-gnome2.h"
Index: src/journal.c
===================================================================
RCS file: /cvsroot/gttr/gnotime/src/journal.c,v
retrieving revision 1.54
diff -u -r1.54 journal.c
--- src/journal.c	7 May 2004 16:03:54 -0000	1.54
+++ src/journal.c	20 Jul 2004 12:03:51 -0000
@@ -28,8 +28,8 @@
 #include <string.h>
 #include <sched.h>
 
-#include <kvp_frame.h>
-#include <qof.h>
+#include <qof/kvp_frame.h>
+#include <qof/qof.h>
 
 #include "app.h"
 #include "ctree.h"
Index: src/main.c
===================================================================
RCS file: /cvsroot/gttr/gnotime/src/main.c,v
retrieving revision 1.36
diff -u -r1.36 main.c
--- src/main.c	23 May 2004 21:15:02 -0000	1.36
+++ src/main.c	20 Jul 2004 12:03:51 -0000
@@ -36,7 +36,7 @@
 #include <sys/wait.h>
 #endif
 
-#include <qof.h>
+#include <qof/qof.h>
 
 #include "app.h"
 #include "ctree.h"
Index: src/prefs.c
===================================================================
RCS file: /cvsroot/gttr/gnotime/src/prefs.c,v
retrieving revision 1.13
diff -u -r1.13 prefs.c
--- src/prefs.c	22 Apr 2004 02:06:10 -0000	1.13
+++ src/prefs.c	20 Jul 2004 12:03:52 -0000
@@ -21,7 +21,7 @@
 
 #include <glade/glade.h>
 #include <gnome.h>
-#include <qof.h>
+#include <qof/qof.h>
 #include <string.h>
 
 #include "app.h"
Index: src/proj.c
===================================================================
RCS file: /cvsroot/gttr/gnotime/src/proj.c,v
retrieving revision 1.25
diff -u -r1.25 proj.c
--- src/proj.c	22 May 2004 14:29:46 -0000	1.25
+++ src/proj.c	20 Jul 2004 12:03:54 -0000
@@ -26,7 +26,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include <qof.h>
+#include <qof/qof.h>
 #include <qof/qofid-p.h>
 
 #include "err-throw.h"
Index: src/xml-read.c
===================================================================
RCS file: /cvsroot/gttr/gnotime/src/xml-read.c,v
retrieving revision 1.8
diff -u -r1.8 xml-read.c
--- src/xml-read.c	30 Apr 2004 14:36:32 -0000	1.8
+++ src/xml-read.c	20 Jul 2004 12:03:55 -0000
@@ -20,7 +20,7 @@
 
 #include <glib.h>
 #include <libxml/parser.h>
-#include <qof.h>
+#include <qof/qof.h>
 #include <stdio.h>
 #include <stdlib.h>
 
Index: src/xml-write.c
===================================================================
RCS file: /cvsroot/gttr/gnotime/src/xml-write.c,v
retrieving revision 1.7
diff -u -r1.7 xml-write.c
--- src/xml-write.c	1 May 2004 04:10:07 -0000	1.7
+++ src/xml-write.c	20 Jul 2004 12:03:55 -0000
@@ -19,7 +19,7 @@
 #include "config.h"
 
 #include <libxml/tree.h>
-#include <qof.h>
+#include <qof/qof.h>
 #include <stdio.h>
 
 #include "err-throw.h"
Index: src/ghtml.h
===================================================================
RCS file: /cvsroot/gttr/gnotime/src/ghtml.h,v
retrieving revision 1.13
diff -u -r1.13 ghtml.h
--- src/ghtml.h	23 Apr 2004 06:25:00 -0000	1.13
+++ src/ghtml.h	20 Jul 2004 12:03:55 -0000
@@ -19,7 +19,7 @@
 #ifndef __GTT_GHTML_H__
 #define __GTT_GHTML_H__
 
-#include <qof.h>
+#include <qof/qof.h>
 
 #include "proj.h"
 
Index: src/proj.h
===================================================================
RCS file: /cvsroot/gttr/gnotime/src/proj.h,v
retrieving revision 1.18
diff -u -r1.18 proj.h
--- src/proj.h	7 May 2004 16:03:54 -0000	1.18
+++ src/proj.h	20 Jul 2004 12:03:56 -0000
@@ -21,7 +21,7 @@
 #define __GTT_PROJ_H__
 
 #include <glib.h>
-#include <qof.h>
+#include <qof/qof.h>
 
 /* The data structures for GnoTime are written in a quasi-object-oriented
  * style.  All data is encapsulated in opaque structs, and can be accessed

gnotime-wordwrap.patch:

--- NEW FILE gnotime-wordwrap.patch ---
Index: glade/notes.glade
===================================================================
RCS file: /cvsroot/gttr/gnotime/glade/notes.glade,v
retrieving revision 1.5
diff -u -r1.5 notes.glade
--- glade/notes.glade	16 Apr 2003 22:02:50 -0000	1.5
+++ glade/notes.glade	28 Nov 2004 04:19:16 -0000
@@ -197,7 +197,7 @@
 		      <property name="can_focus">True</property>
 		      <property name="editable">True</property>
 		      <property name="justification">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap_mode">GTK_WRAP_NONE</property>
+		      <property name="wrap_mode">GTK_WRAP_WORD</property>
 		      <property name="cursor_visible">True</property>
 		      <property name="pixels_above_lines">0</property>
 		      <property name="pixels_below_lines">0</property>
@@ -337,7 +337,7 @@
 		      <property name="can_focus">True</property>
 		      <property name="editable">True</property>
 		      <property name="justification">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap_mode">GTK_WRAP_NONE</property>
+		      <property name="wrap_mode">GTK_WRAP_WORD</property>
 		      <property name="cursor_visible">True</property>
 		      <property name="pixels_above_lines">0</property>
 		      <property name="pixels_below_lines">0</property>


--- NEW FILE gnotime.spec ---
Name:           gnotime
Version:        2.2.1
Release:        0.fdr.5.2
Epoch:          0
Summary:        Tracks and reports time spent

Group:          Applications/Productivity
License:        GPL
URL:            http://gttr.sourceforge.net/
Source0:        http://dl.sf.net/gttr/%{name}-%{version}.tar.gz
# Images to go with the help files.
Source1:	http://www.tiki-lounge.com/~toshio/fedora/gtt_restartwin.png
Source2:	http://www.tiki-lounge.com/~toshio/fedora/gtt_startprojwin.png
# Simple patch to make the .desktop more complete
Patch0:         http://www.tiki-lounge.com/~toshio/fedora/gnotime-desktop.patch
# Combined patch allowing builds with gtkhtml3.0 or 3.1 and
# builds with a libqof installed on the system instead of bundled with Gnotime.
Patch1:         http://www.tiki-lounge.com/~toshio/fedora/gnotime-gtkhtml3-qof.patch
# Fixes includes of qof headers in source files.
Patch2:		http://www.tiki-lounge.com/~toshio/fedora/gnotime-qof-include.patch
# Fixes the idle timer for kernel 2.6.
Patch3:		http://www.tiki-lounge.com/~toshio/fedora/gnotime-idle.patch
# Fixes problems with calls to gnome_help
Patch4:		http://www.tiki-lounge.com/~toshio/fedora/gnotime-help.patch
# Fixes problems with popup menus failing to pass data arguments to callbacks
Patch5:		http://www.tiki-lounge.com/~toshio/fedora/gnotime-popup-menus.patch
# Fixes problem with gnome_help being invoked when the toplevel is unknown
Patch6:		http://www.tiki-lounge.com/~toshio/fedora/gnotime-help-error.patch
# Add wordwrapping to textviews
Patch7:		http://www.tiki-lounge.com/~toshio/fedora/gnotime-wordwrap.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  gtkhtml3-devel
BuildRequires:  guile-devel >= 0:1.6.0
BuildRequires:  scrollkeeper
BuildRequires:  gettext
BuildRequires:  desktop-file-utils
BuildRequires:  qof-devel >= 0:0.5.0
BuildRequires:  qof-devel < 0:0.6.0
# Because we modify configure.in, we need to BR the auto* tools.
BuildRequires: libtool

Requires(post): scrollkeeper
Requires(postun): scrollkeeper
Requires(post): GConf2
Requires(preun): GConf2
#Conflicts:      
#Obsoletes:      
#BuildConflicts: 

%description
A combination of stop-watch, diary, consultant billing system, and project
manager.  Gnotime allows you to track the amount of time you spend on a task,
associate a memo with it, set a billing rate, print an invoice, as well as
track the status of other projects.

Some people may remember Gnotime in its previous incarnations as GTT
(Gnome Time Tracker) when it was part of the Gnome Utils package.  It has
been split out, renamed, and greatly enhanced since then.

%prep
%setup -q
%patch0 -p0
%patch1 -p0
%patch2 -p0
%patch3 -p0
%patch4 -p0
%patch5 -p0
%patch6 -p0
%patch7 -p0

cp $RPM_SOURCE_DIR/gtt_restartwin.png $RPM_BUILD_DIR/%{name}-%{version}/doc/C/figures/
cp $RPM_SOURCE_DIR/gtt_startprojwin.png $RPM_BUILD_DIR/%{name}-%{version}/doc/C/figures/

# Copy the images to the correct position

%build
autoreconf --install --force
%GNUconfigure
make

%install
rm -rf $RPM_BUILD_ROOT
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
%makeinstall
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL

# Gnotime puts it's locale translations into gnotime-2.0.mo but it's gnome
# help files into html/gnotime....
%find_lang  %{name} --with-gnome
%find_lang  %{name}-2.0 --with-gnome
cat %{name}-2.0.lang >> %{name}.lang

# Gnotime uses scrollkeeper to track help data.  Unfortunately, it needs to
# install at package install, not build install.  So uninstall it now.
rm -rf $RPM_BUILD_ROOT%{_localstatedir}

# Gnotime installs the .desktop, but we have to do it again as directories
# and methods of install and such have changed.
rm -f $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
desktop-file-install --vendor=fedora --dir=$RPM_BUILD_ROOT%{_datadir}/applications --add-category=X-Fedora gnotime.desktop

%clean
rm -rf $RPM_BUILD_ROOT

%post
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/%{name}.schemas &>/dev/null || :
unset GCONF_CONFIG_SOURCES
scrollkeeper-update -q -o %{_datadir}/omf/gnotime || :

%preun
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/%{name}.schemas &>/dev/null || :
unset GCONF_CONFIG_SOURCE

%postun
scrollkeeper-update -q || :

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog NEWS README TODO
%{_bindir}/*
%{_datadir}/%{name}
%{_datadir}/omf/*
%{_datadir}/applications/fedora-%{name}.desktop
%{_mandir}/man[^3]/*
%{_sysconfdir}/gconf/schemas/*

%changelog
* Sat Nov 27 2004 Toshio Kuratomi <toshio-tiki-lounge.com> - 0:2.2.1-0.fdr.5
- Patch to fix a crash when invoking gnome_help.
- Patch to wordwrap diary notes.
  
* Thu Sep 30 2004 Toshio Kuratomi <toshio-tiki-lounge.com> - 0:2.2.1-0.fdr.4
- New patch to fix the Activity entry in the popup menu.

* Sat Aug 7 2004 Toshio Kuratomi <toshio[AT]tiki-lounge.com> - 0:2.2.1-0.fdr.3
- Patch to fix gnome help invocation.
- Submitted upstream.

* Mon Jul 19 2004 Toshio Kuratomi <toshio[AT]tiki-lounge.com> - 0:2.2.1-0.fdr.2
- Combined gtkhtml3/qof patch that has the gtkhtml3 fix and work to allow
  building with a system installed libqof.
- Build with a system installed libqof.
- Patch to fix the inclusion of headers in C source.
- Update the .desktop patch to use false on "Needs Terminal".

* Sun Jul 11 2004 Toshio Kuratomi <toshio[AT]tiki-lounge.com> - 0:2.2.1-0.fdr.1
- Upgrade to 2.2.1.
- Remove extraneous BuildRequires.
- Change .desktop fix-ups into a patch to submit upstream.
- Remove doc patches as they've gone in upstream.
- Patch to fix building with libgtkhtml3.0
- And require automake, autoconf, etc because the gtkhtml patch applies to
  configure.in.  Decided this is preferable to a postautogen patch because it
  takes too much effort for someone to QA a huge postautogen patch.
- Patch to the idle timer to properly work with kernel-2.6's /proc/interrupts
- Removed smp flags as this version isn't smp-able.

* Mon Feb 02 2004 Toshio Kuratomi <toshio[AT]tiki-lounge.com> - 0:2.1.7-0.fdr.4
- Fix preun script which was calling gconftool on straw rather than gnotime.
- Add desktop-file-utils Requires and use them to (re)install the .desktop
  file so we can add --vendor and --add-category X-Fedora
- Add StartupNotify to the desktop file

* Wed Dec 31 2003 Toshio Kuratomi <toshio[AT]tiki-lounge.com> - 0:2.1.7-0.fdr.3
- Change the build process back to patching as there is no consensus and I
  agree with the patching argument rather than autogen-in-spec argument.
- Make sure the gconf schema gets installed into the sysconfigdir
- Use gconftool-2 in the post/postun scripts to install the schema into gconf.
- Make scrollkeeper non-optional.  Since most other fedora packages using
  scrollkeeper require it and not having scrollkeeper tends to make help
  unusable.

* Sun Dec 28 2003 Toshio Kuratomi <toshio[AT]tiki-lounge.com> - 0:2.1.7-0.fdr.2
- Fix up the BuildRequires -- if one package will pull in another
  automatically, then do not explicitly list it.
- Change the build process.  Instead of generating a post-autogen patch and
  patching the distributed source, run autogen.sh to regenerate the build
  infrastructure.  (This is necessary in the first place because the doc
  build structure needed to be modified.)

* Mon Dec 15 2003 Toshio Kuratomi <toshio[AT]tiki-lounge.com> - 0:2.1.7-0.fdr.1
- Initial Fedora RPM release.
- Partially adapted from the gnotime.spec.in by Eric Anderson 
  <eric.anderson[AT]cordata.net> from the Red Hat directory in the gnotime
  distribution.


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/gnotime/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	16 Dec 2004 17:31:05 -0000	1.1
+++ .cvsignore	16 Dec 2004 17:34:07 -0000	1.2
@@ -0,0 +1 @@
+gnotime-2.2.1.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/gnotime/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	16 Dec 2004 17:31:05 -0000	1.1
+++ sources	16 Dec 2004 17:34:07 -0000	1.2
@@ -0,0 +1 @@
+e2aad191b62b41da7f2176a028f1aaf9  gnotime-2.2.1.tar.gz




More information about the fedora-extras-commits mailing list