diff -Nru wmclockmon-0.8.1/configure.ac wmclockmon-0.8.1/configure.ac --- wmclockmon-0.8.1/configure.ac 2016-02-19 00:47:16.000000000 +0000 +++ wmclockmon-0.8.1/configure.ac 2005-04-07 09:37:43.000000000 +0000 @@ -98,7 +98,7 @@ ignore_buffers=yes ignore_cached=yes ;; -[k]freebsd*) +freebsd*) OS=freebsd ignore_wired=yes ignore_cached=yes diff -Nru wmclockmon-0.8.1/debian/changelog wmclockmon-0.8.1/debian/changelog --- wmclockmon-0.8.1/debian/changelog 2016-02-19 00:47:16.000000000 +0000 +++ wmclockmon-0.8.1/debian/changelog 2016-02-17 04:38:51.000000000 +0000 @@ -1,8 +1,41 @@ -wmclockmon (0.8.1-2ubuntu1) oneiric; urgency=low +wmclockmon (0.8.1-3) unstable; urgency=medium - * Fix FTBFS with ld --as-needed. + * New maintainer (Debian Window Maker Team). + * Tidy up package using wrap-and-sort. + * debian/compat + - Bump to 9. + * debian/copyright + - Update to DEP5 format. + * debian/control + - Bump Standards-Version to 3.9.7. + - Add ${misc:Depends} to Depends. + - Add dh-autoreconf and pkg-config to Build-Depends. + - Remove autotools-dev and xlibs-dev from Build-Depends. + - Bump versioned dependency on debhelper to >= 9. + - Add Homepage and Vcs-* fields. + * debian/dirs + - Remove unnecessary file. + * debian/docs + - Remove empty file. + * debian/patches/{build_against_gtk2,kfreebsd_build}.patch + - Convert existing Debian patches to quilt. + - Link GTK+ libraries in the correct order, allowing --as-needed builds + (Closes: #641335). + * debian/patches/check_free.patch + - New patch; avoid crash if memory is freed without being allocated. + * debian/patches/fix_typos.patch + - New patch; fix typos pointed out by Lintian. + * debian/patches/update_autotools.patch + - New patch; a couple fixes allowing build to work with dh_autoreconf. + * debian/rules + - Use dh with dh_autoreconf. + - Enable all hardening flags. + * debian/source/format + - New file; use 3.0 (quilt). + * debian/watch + - Update with comment since upstream webpage is broken. - -- Matthias Klose Mon, 12 Sep 2011 15:50:54 +0200 + -- Doug Torrance Tue, 16 Feb 2016 23:34:59 -0500 wmclockmon (0.8.1-2) unstable; urgency=low @@ -10,23 +43,23 @@ Thanks! (Closes: #437442, #527784) * Fix configure.ac to correctly handle kfreebsd (not only freebsd), patch provided by Pierre Chifflier . (Closes: #376735) - * Fixed packaging to drag in fresh config.{sub,guess} at every build. + * Fix packaging to drag in fresh config.{sub,guess} at every build. (Closes: #355731) - * Updated to debhelper 7 and policy 3.8.3. - * Squashed several lintian warnings (doing the menu transition on the way) + * Update to debhelper 7 and policy 3.8.3. + * Squash several lintian warnings (doing the menu transition on the way) -- Marc 'HE' Brockschmidt Sun, 16 Aug 2009 13:05:34 +0200 wmclockmon (0.8.1-1) unstable; urgency=low * New upstream release. - * src/main.c,wmclockmon-cal: Fixed some compilation warnings. + * src/main.c,wmclockmon-cal: Fix some compilation warnings. -- Marc 'HE' Brockschmidt Wed, 15 Jun 2005 16:06:12 +0200 wmclockmon (0.8.0-2) unstable; urgency=low - * debian/control: Added libxt-dev to make the damn thing build. (Closes: + * debian/control: Added lib-dev to make the damn thing build. (Closes: #256421) -- Marc 'HE' Brockschmidt Sun, 27 Jun 2004 22:36:54 +0200 @@ -55,8 +88,8 @@ * New upstream release: Now also provides a binary clock (this seems to be a needed feature atm) - * debian/watch: Added, upstream releases fast :) - * debian/menu: Added quotes to make new lintian happy. + * debian/watch: Add, upstream releases fast :) + * debian/menu: Add quotes to make new lintian happy. -- Marc 'HE' Brockschmidt Thu, 26 Feb 2004 13:51:24 +0100 diff -Nru wmclockmon-0.8.1/debian/compat wmclockmon-0.8.1/debian/compat --- wmclockmon-0.8.1/debian/compat 2016-02-19 00:47:16.000000000 +0000 +++ wmclockmon-0.8.1/debian/compat 2016-02-17 04:19:41.000000000 +0000 @@ -1 +1 @@ -7 +9 diff -Nru wmclockmon-0.8.1/debian/control wmclockmon-0.8.1/debian/control --- wmclockmon-0.8.1/debian/control 2016-02-19 00:47:16.000000000 +0000 +++ wmclockmon-0.8.1/debian/control 2016-02-17 04:20:22.000000000 +0000 @@ -1,13 +1,25 @@ Source: wmclockmon Section: x11 Priority: optional -Maintainer: Marc 'HE' Brockschmidt -Build-Depends: libgtk2.0-dev, libx11-dev | xlibs-dev (>> 4.1.0), libxext-dev | xlibs-dev (>> 4.1.0), libxi-dev | xlibs-dev (>> 4.1.0), libxpm-dev | xlibs-dev (>> 4.1.0), libxt-dev | xlibs-dev (>> 4.1.0), debhelper (>= 7), autotools-dev -Standards-Version: 3.8.3 +Maintainer: Debian Window Maker Team +Uploaders: Doug Torrance +Build-Depends: debhelper (>= 9), + dh-autoreconf, + libgtk2.0-dev, + libx11-dev, + libxext-dev, + libxi-dev, + libxpm-dev, + libxt-dev, + pkg-config +Standards-Version: 3.9.7 +Homepage: http://tnemeth.free.fr/projets/dockapps.html +Vcs-Browser: https://anonscm.debian.org/git/pkg-wmaker/wmclockmon.git +Vcs-Git: https://anonscm.debian.org/git/pkg-wmaker/wmclockmon.git Package: wmclockmon Architecture: any -Depends: ${shlibs:Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} Description: Displays a clock in 12/24h mode with alarm mode wmclockmon displays a clock like wmtime, but with an alarm timer and different styles (14 + user customized ones). There's also a "binary diff -Nru wmclockmon-0.8.1/debian/copyright wmclockmon-0.8.1/debian/copyright --- wmclockmon-0.8.1/debian/copyright 2005-04-07 09:37:43.000000000 +0000 +++ wmclockmon-0.8.1/debian/copyright 2016-02-17 04:20:27.000000000 +0000 @@ -1,15 +1,54 @@ -This package was debianized by Marc Brockschmidt on -Mon, 21 Jul 2003 21:12:17 +0200. - -It was downloaded from http://tnemeth.free.fr/projets/dockapps.html - -Upstream Author: Thomas Nemeth - -Copyright: (c) Thomas Nemeth 2002-2003 - -wmclockmon is released under the terms of the GNU GPL version 2. - -On Debian GNU/Linux systems, the complete text of the GNU -General Public License version 2 can be found in -/usr/share/common-licenses/GPL-2. - +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: wmclockmon +Source: http://tnemeth.free.fr/projets/dockapps.html + +Files: * +Copyright: 2002-2003 Thomas Nemeth +License: GPL-2+ + +Files: src/dockapp.* +Copyright: 1999 Alfredo K. Kojima + 2001, 2002 Seiichi SATO +License: Expat + +Files: debian/* +Copyright: 2003 Marc Brockschmidt + 2016 Doug Torrance +License: GPL-2+ + +License: GPL-2+ + This package 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. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see + . + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". + +License: Expat + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + . + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff -Nru wmclockmon-0.8.1/debian/dirs wmclockmon-0.8.1/debian/dirs --- wmclockmon-0.8.1/debian/dirs 2005-04-07 09:37:43.000000000 +0000 +++ wmclockmon-0.8.1/debian/dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/bin diff -Nru wmclockmon-0.8.1/debian/docs wmclockmon-0.8.1/debian/docs --- wmclockmon-0.8.1/debian/docs 2016-02-19 00:47:16.000000000 +0000 +++ wmclockmon-0.8.1/debian/docs 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ - diff -Nru wmclockmon-0.8.1/debian/patches/build_against_gtk2.patch wmclockmon-0.8.1/debian/patches/build_against_gtk2.patch --- wmclockmon-0.8.1/debian/patches/build_against_gtk2.patch 1970-01-01 00:00:00.000000000 +0000 +++ wmclockmon-0.8.1/debian/patches/build_against_gtk2.patch 2016-02-17 04:19:42.000000000 +0000 @@ -0,0 +1,296 @@ +Description: Build against GTK+ 2.0. + Converted to quilt for version 0.8.1-3. Also, the original patch modified + wmclockmon-c*/Makefile.in, which are now overwritten by dh_autoreconf. So we + patch wmclockmon-c*/Makefile.am instead. In the process, we fix #641335, + as the GTK+ libraries were previously linked in the wrong order. +Author: Julien BLACHE +Author: Doug Torrance +Bug-Debian: https://bugs.debian.org/437442 +Bug-Debian: https://bugs.debian.org/641335 +Last-Update: 2016-01-28 + +--- a/wmclockmon-cal/mainwindow.c ++++ b/wmclockmon-cal/mainwindow.c +@@ -51,7 +51,6 @@ + gtk_widget_hide(calendar); + gtk_widget_hide(closewindow); + gtk_widget_grab_default(GTK_WIDGET(cancel)); +- gtk_widget_draw_default(GTK_WIDGET(cancel)); + gtk_widget_grab_focus(GTK_WIDGET(edit)); + gtk_widget_show(text_buttons); + gtk_widget_show(edit); +@@ -69,7 +68,6 @@ + gtk_widget_hide(cancel); + gtk_widget_show(calendar); + gtk_widget_grab_default(GTK_WIDGET(closewindow)); +- gtk_widget_draw_default(GTK_WIDGET(closewindow)); + gtk_widget_grab_focus(GTK_WIDGET(closewindow)); + gtk_widget_show(closewindow); + } +@@ -93,13 +91,20 @@ + FILE *file; + char *filename = get_file(datestr); + ++ GtkTextIter iter; ++ GtkTextBuffer *buf; ++ ++ buf = GTK_TEXT_BUFFER(gtk_text_view_get_buffer(GTK_TEXT_VIEW(edit))); ++ gtk_text_buffer_get_end_iter(GTK_TEXT_BUFFER(gtk_text_view_get_buffer(GTK_TEXT_VIEW(edit))), &iter); ++ gtk_text_buffer_place_cursor(GTK_TEXT_BUFFER(gtk_text_view_get_buffer(GTK_TEXT_VIEW(edit))), &iter); ++ + if ((file = fopen(filename, "r")) != NULL) { + while (! feof(file)) { + char line[MAXSTRLEN + 1]; + bzero(line, MAXSTRLEN + 1); + fgets(line, MAXSTRLEN, file); + if (line[0] != 0) +- gtk_text_insert(GTK_TEXT(edit), NULL, NULL, NULL, line, -1); ++ gtk_text_buffer_insert(buf, &iter, line, -1); + } + fclose(file); + } +@@ -154,21 +159,14 @@ + + + static void editor_flush() { +- int cont = TRUE; +- +- while (cont) { +- cont = gtk_text_backward_delete(GTK_TEXT(edit), 1); +- } +- cont = TRUE; +- while (cont) { +- cont = gtk_text_forward_delete(GTK_TEXT(edit), 1); +- } ++ gtk_text_buffer_set_text(GTK_TEXT_BUFFER(gtk_text_view_get_buffer(GTK_TEXT_VIEW(edit))), "", 0); + } + + + static void editor_fill(int which) { + char *filename, *dstr; + GtkWidget *label; ++ GtkTextIter iter; + + switch (which) { + case UNIQUE: label = label_u; break; +@@ -179,11 +177,10 @@ + gtk_label_get(GTK_LABEL(label), &dstr); + strcpy(daystr, dstr); + to_button(which); +- gtk_text_freeze(GTK_TEXT(edit)); + editor_flush(); + load_file(daystr); +- gtk_text_set_point(GTK_TEXT(edit), gtk_text_get_length(GTK_TEXT(edit))); +- gtk_text_thaw(GTK_TEXT(edit)); ++ gtk_text_buffer_get_end_iter(GTK_TEXT_BUFFER(gtk_text_view_get_buffer(GTK_TEXT_VIEW(edit))), &iter); ++ gtk_text_buffer_place_cursor(GTK_TEXT_BUFFER(gtk_text_view_get_buffer(GTK_TEXT_VIEW(edit))), &iter); + } + + +@@ -225,8 +222,15 @@ + char *dirname = xmalloc(len + 2); + struct stat stat_buf; + ++ GtkTextIter ts, te; ++ gchar *tbuf; ++ int tlen; ++ ++ tlen = gtk_text_buffer_get_char_count(GTK_TEXT_BUFFER(gtk_text_view_get_buffer(GTK_TEXT_VIEW(edit)))); ++ gtk_text_buffer_get_bounds(GTK_TEXT_BUFFER(gtk_text_view_get_buffer(GTK_TEXT_VIEW(edit))), &ts, &te); ++ + sprintf(dirname, "%s/%s", robust_home(), DEFAULT_CONFIGDIR); +- if (gtk_text_get_length(GTK_TEXT(edit)) > 0) { ++ if (tlen > 0) { + if (! ((stat(dirname, &stat_buf) == 0) && S_ISDIR(stat_buf.st_mode))) + mkdir(dirname, 0755); + +@@ -235,13 +239,11 @@ + int year, month, day; + + if (file) { +- int i; +- for (i = 0 ; i < gtk_text_get_length(GTK_TEXT(edit)) ; i++) { +- char t = GTK_TEXT_INDEX(GTK_TEXT(edit), i); +- fprintf(file, "%c", t); +- } +- fflush(file); +- fclose(file); ++ tbuf = gtk_text_buffer_get_text(GTK_TEXT_BUFFER(gtk_text_view_get_buffer(GTK_TEXT_VIEW(edit))), &ts, &te, TRUE); ++ fprintf(file, "%s", tbuf); ++ g_free(tbuf); ++ fflush(file); ++ fclose(file); + } + gtk_calendar_get_date(GTK_CALENDAR(calendar), &year, &month, &day); + gtk_calendar_mark_day(GTK_CALENDAR(calendar), day); +@@ -259,9 +261,7 @@ + gtk_calendar_get_date(GTK_CALENDAR(calendar), &year, &month, &day); + gtk_calendar_unmark_day(GTK_CALENDAR(calendar), day); + FREE(filename); +- gtk_text_freeze(GTK_TEXT(edit)); + editor_flush(); +- gtk_text_thaw(GTK_TEXT(edit)); + } + + +@@ -357,10 +357,10 @@ + GTK_SIGNAL_FUNC(mark_days), NULL); + gtk_widget_show(calendar); + +- edit = gtk_text_new(NULL, NULL); +- gtk_text_set_editable(GTK_TEXT(edit), TRUE); +- gtk_text_set_word_wrap(GTK_TEXT(edit), TRUE); +- gtk_text_set_line_wrap(GTK_TEXT(edit), TRUE); ++ edit = gtk_text_view_new(); ++ gtk_text_view_set_editable(GTK_TEXT_VIEW(edit), TRUE); ++ gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(edit), GTK_WRAP_WORD_CHAR); ++ + gtk_box_pack_start(GTK_BOX(main_vbox), edit, TRUE, TRUE, 1); + + +@@ -413,7 +413,6 @@ + gtk_box_pack_start(GTK_BOX(buttons_hbox), closewindow, TRUE, TRUE, 0); + GTK_WIDGET_SET_FLAGS(GTK_WIDGET(closewindow), GTK_CAN_DEFAULT); + gtk_widget_grab_default(GTK_WIDGET(closewindow)); +- gtk_widget_draw_default(GTK_WIDGET(closewindow)); + gtk_widget_show(closewindow); + + +--- a/wmclockmon-config/dialogs.c ++++ b/wmclockmon-config/dialogs.c +@@ -38,7 +38,6 @@ + bouton, TRUE, TRUE, 0); + GTK_WIDGET_SET_FLAGS(GTK_WIDGET(bouton), GTK_CAN_DEFAULT); + gtk_widget_grab_default(GTK_WIDGET(bouton)); +- gtk_widget_draw_default(GTK_WIDGET(bouton)); + gtk_widget_show(bouton); + + bouton = gtk_button_new_with_label("No"); +@@ -96,7 +95,6 @@ + bouton, TRUE, TRUE, 0); + GTK_WIDGET_SET_FLAGS(GTK_WIDGET(bouton), GTK_CAN_DEFAULT); + gtk_widget_grab_default(GTK_WIDGET(bouton)); +- gtk_widget_draw_default(GTK_WIDGET(bouton)); + gtk_widget_show(bouton); + + gtk_container_set_border_width(GTK_CONTAINER +--- a/wmclockmon-config/edit.c ++++ b/wmclockmon-config/edit.c +@@ -76,7 +76,6 @@ + bouton, TRUE, TRUE, 0); + GTK_WIDGET_SET_FLAGS(GTK_WIDGET(bouton), GTK_CAN_DEFAULT); + gtk_widget_grab_default(GTK_WIDGET(bouton)); +- gtk_widget_draw_default(GTK_WIDGET(bouton)); + gtk_widget_show(bouton); + + bouton = gtk_button_new_with_label("Cancel"); +--- a/wmclockmon-config/mainwindow.c ++++ b/wmclockmon-config/mainwindow.c +@@ -10,9 +10,9 @@ + #include "actions.h" + + +-static GtkWidget *edit; +-static GtkWidget *set; +-static GtkWidget *remove; ++static GtkWidget *b_edit; ++static GtkWidget *b_set; ++static GtkWidget *b_remove; + + static gint list_sel_cb (GtkCList *clist, + gint row, +@@ -20,9 +20,9 @@ + GdkEventButton *event, + void *data) { + selected_row = row; +- gtk_widget_set_sensitive(edit, TRUE); +- gtk_widget_set_sensitive(set, TRUE); +- gtk_widget_set_sensitive(remove, TRUE); ++ gtk_widget_set_sensitive(b_edit, TRUE); ++ gtk_widget_set_sensitive(b_set, TRUE); ++ gtk_widget_set_sensitive(b_remove, TRUE); + return TRUE; + } + +@@ -33,9 +33,9 @@ + GdkEventButton *event, + void *data) { + selected_row = -1; +- gtk_widget_set_sensitive(edit, FALSE); +- gtk_widget_set_sensitive(set, FALSE); +- gtk_widget_set_sensitive(remove, FALSE); ++ gtk_widget_set_sensitive(b_edit, FALSE); ++ gtk_widget_set_sensitive(b_set, FALSE); ++ gtk_widget_set_sensitive(b_remove, FALSE); + return TRUE; + } + +@@ -267,7 +267,7 @@ + gtk_table_attach_defaults(GTK_TABLE(table), bouton, 0, 1, 1, 2); + gtk_widget_set_sensitive(bouton, FALSE); + gtk_widget_show(bouton); +- edit = bouton; ++ b_edit = bouton; + + bouton = gtk_button_new_with_label(" Switch On/Off "); + gtk_signal_connect(GTK_OBJECT(bouton), "clicked", +@@ -275,7 +275,7 @@ + gtk_table_attach_defaults(GTK_TABLE(table), bouton, 1, 2, 1, 2); + gtk_widget_set_sensitive(bouton, FALSE); + gtk_widget_show(bouton); +- set = bouton; ++ b_set = bouton; + + bouton = gtk_button_new_with_label(" Remove alarm "); + gtk_signal_connect(GTK_OBJECT(bouton), "clicked", +@@ -283,7 +283,7 @@ + gtk_table_attach_defaults(GTK_TABLE(table), bouton, 1, 2, 0, 1); + gtk_widget_set_sensitive(bouton, FALSE); + gtk_widget_show(bouton); +- remove = bouton; ++ b_remove = bouton; + + + label = gtk_label_new(" Alarms "); +@@ -312,7 +312,6 @@ + gtk_box_pack_start(GTK_BOX(buttons_hbox), bouton, TRUE, TRUE, 0); + GTK_WIDGET_SET_FLAGS(GTK_WIDGET(bouton), GTK_CAN_DEFAULT); + gtk_widget_grab_default(GTK_WIDGET(bouton)); +- gtk_widget_draw_default(GTK_WIDGET(bouton)); + gtk_widget_show(bouton); + + bouton = gtk_button_new_with_label(" Cancel "); +--- a/wmclockmon-cal/Makefile.am ++++ b/wmclockmon-cal/Makefile.am +@@ -11,6 +11,9 @@ + + CPPFLAGS = @CPPFLAGS@ @DFLAGS@ + ++AM_CFLAGS = $(gtk_CFLAGS) ++LIBS += $(gtk_LIBS) ++ + INCLUDES = @HEADER_SEARCH_PATH@ + + wmclockmon_LDADD = @LIBRARY_SEARCH_PATH@ @XLIBS@ +--- a/wmclockmon-config/Makefile.am ++++ b/wmclockmon-config/Makefile.am +@@ -18,6 +18,9 @@ + + CPPFLAGS = @CPPFLAGS@ @DFLAGS@ + ++AM_CFLAGS = $(gtk_CFLAGS) ++LIBS += $(gtk_LIBS) ++ + INCLUDES = @HEADER_SEARCH_PATH@ + + wmclockmon_LDADD = @LIBRARY_SEARCH_PATH@ @XLIBS@ +--- a/configure.ac ++++ b/configure.ac +@@ -28,6 +28,7 @@ + [ --with-incs-from pass compiler flags to look for header files], + [inc_search_path="$withval $inc_search_path"]) + ++PKG_CHECK_MODULES([gtk], [gtk+-2.0]) + + dnl =========================================== + dnl Stuff that uses X diff -Nru wmclockmon-0.8.1/debian/patches/check_free.patch wmclockmon-0.8.1/debian/patches/check_free.patch --- wmclockmon-0.8.1/debian/patches/check_free.patch 1970-01-01 00:00:00.000000000 +0000 +++ wmclockmon-0.8.1/debian/patches/check_free.patch 2016-02-17 04:37:35.000000000 +0000 @@ -0,0 +1,44 @@ +Description: Check whether memory has been allocated before freeing. + Two strings, command and light_color, were always freed even though they + were only conditionally allocated. This could cause "munmap_chunk(): invalid + pointer" errors. We fix this by keeping track of whether they have been + allocated and only freeing if they have. +Author: Doug Torrance +Last-Update: 2016-02-16 + +--- a/wmclockmon-config/actions.c ++++ b/wmclockmon-config/actions.c +@@ -21,9 +21,11 @@ + + + void quit_app() { +- FREE(command); ++ if (free_command) ++ FREE(command); + FREE(config_file); +- FREE(light_color); ++ if (free_light_color) ++ FREE(light_color); + free_alrm(&alarms); + gtk_main_quit(); + } +--- a/wmclockmon-config/tools.c ++++ b/wmclockmon-config/tools.c +@@ -139,6 +139,7 @@ + printf("Unable to open configuration file \"%s\".\n", config_file); + return; + } ++ free_light_color = free_command = 0; + while (! feof(file)) { + memset(line, 0, MAXSTRLEN + 1); + fgets(line, MAXSTRLEN, file); +--- a/wmclockmon-config/variables.h ++++ b/wmclockmon-config/variables.h +@@ -22,5 +22,7 @@ + char *command; + char *msgcmd; + Alarm *alarms; ++int free_light_color; ++int free_command; + + #endif diff -Nru wmclockmon-0.8.1/debian/patches/fix_typos.patch wmclockmon-0.8.1/debian/patches/fix_typos.patch --- wmclockmon-0.8.1/debian/patches/fix_typos.patch 1970-01-01 00:00:00.000000000 +0000 +++ wmclockmon-0.8.1/debian/patches/fix_typos.patch 2016-02-17 04:20:27.000000000 +0000 @@ -0,0 +1,78 @@ +Description: Fix typos pointed out by Lintian. + In particular, we had spelling-error-in-binary and spelling-error-in-manpage + warnings. +Author: Doug Torrance +Last-Update: 2016-01-28 + +--- a/wmclockmon-config/configfile.h ++++ b/wmclockmon-config/configfile.h +@@ -7,7 +7,7 @@ + + char *configfile = + "# AUTOGENERATED configuration file for wmmclockmon\n" +- "# empty lines or lines begining with # are ignored\n" ++ "# empty lines or lines beginning with # are ignored\n" + "# booleans can take the next values : 0 1 true false yes no on off\n" + "# and are case insensitive\n" + "\n" +--- a/doc/wmclockmon-config.1 ++++ b/doc/wmclockmon-config.1 +@@ -40,7 +40,7 @@ + + .SH FILE + .B wmclockmon\-config +-uses one default file : ~/.wmclockmonrc. Empty lines or lines begining ++uses one default file : ~/.wmclockmonrc. Empty lines or lines beginning + with a # are ignored. + + +--- a/doc/wmclockmon.1 ++++ b/doc/wmclockmon.1 +@@ -63,7 +63,7 @@ + override those given before. + + Alarms can be added automatically with the included calendar (see below and +-wmclockmon-cal(1) for more informations). Moreover the today's calendar can ++wmclockmon-cal(1) for more information). Moreover the today's calendar can + be displayed at startup or at 00:00. In that order, the \fIMessageCmd\fP + option is used. + +@@ -128,9 +128,9 @@ + .TP + .B \-s, \-\-style + style to use for display. If \-sd is given, there is no need to give an +-extention since it is automatically given (\fI.mwcs\fP). Using this option ++extension since it is automatically given (\fI.mwcs\fP). Using this option + to a \fI.mwcs\fP file automatically sets the styles directory if not already +-given. A subsequent use of \-sd will overwrite it. Using another extention ++given. A subsequent use of \-sd will overwrite it. Using another extension + may give erroneous results. + .TP + .B \-sd, \-\-style\-dir +@@ -146,7 +146,7 @@ + don't use the current locale (use the C locale instead). + .TP + .B \-l, \-\-label +-use a label instead of the current date (usefull if you have multiple ++use a label instead of the current date (useful if you have multiple + instances running different timezones). + .TP + .B \-sc, \-\-show\-cal +@@ -158,7 +158,7 @@ + + .SH FILES + .B wmclockmon +-uses one default file : ~/.wmclockmonrc. Empty lines or lines begining ++uses one default file : ~/.wmclockmonrc. Empty lines or lines beginning + with a # are ignored. Entries are summarized below (default value in + parenthesis). Booleans can be either 1/0, true/false, yes/no or + on/off, case insensitive. A sample file is given in the source package. +@@ -224,7 +224,7 @@ + letters style file and a internet time style file. Each of them contains + several variables and their associated values. If only the main style file + have its extension fixed to \fI.mwcs\fP, the others can have whatever name +-you want but using those given is usefull for understanding :) ++you want but using those given is useful for understanding :) + + .SS MAIN STYLE FILE (.mwcs) + diff -Nru wmclockmon-0.8.1/debian/patches/kfreebsd_build.patch wmclockmon-0.8.1/debian/patches/kfreebsd_build.patch --- wmclockmon-0.8.1/debian/patches/kfreebsd_build.patch 1970-01-01 00:00:00.000000000 +0000 +++ wmclockmon-0.8.1/debian/patches/kfreebsd_build.patch 2016-02-17 04:19:42.000000000 +0000 @@ -0,0 +1,20 @@ +Description: Fix FTBFS on GNU/kFreeBSD + wmclockmon fails to build on kFreeBSD, mostly because the configure + script does not check the arch correctly. + . + Converted to quilt for version 0.8.1-3. +Author: Pierre Chifflier +Bug-Debian: https://bugs.debian.org/376735 +Last-Update: 2016-01-27 + +--- a/configure.ac ++++ b/configure.ac +@@ -98,7 +98,7 @@ + ignore_buffers=yes + ignore_cached=yes + ;; +-freebsd*) ++[k]freebsd*) + OS=freebsd + ignore_wired=yes + ignore_cached=yes diff -Nru wmclockmon-0.8.1/debian/patches/series wmclockmon-0.8.1/debian/patches/series --- wmclockmon-0.8.1/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ wmclockmon-0.8.1/debian/patches/series 2016-02-17 04:37:35.000000000 +0000 @@ -0,0 +1,5 @@ +kfreebsd_build.patch +update_autotools.patch +build_against_gtk2.patch +fix_typos.patch +check_free.patch diff -Nru wmclockmon-0.8.1/debian/patches/update_autotools.patch wmclockmon-0.8.1/debian/patches/update_autotools.patch --- wmclockmon-0.8.1/debian/patches/update_autotools.patch 1970-01-01 00:00:00.000000000 +0000 +++ wmclockmon-0.8.1/debian/patches/update_autotools.patch 2016-02-17 04:19:42.000000000 +0000 @@ -0,0 +1,42 @@ +Description: Update autotools files to work with dh_autoreconf. + Prior to version 0.8.1-3, many of the patches were applied directly to + the various Makefile.in's. Now with dh_autoreconf, these would be + overwritten. + . + In particular, we define the DATADIR macro and make sure that the auxiliary + programs wmclockmon-cal and wmclockmon-config are built properly. +Author: Doug Torrance +Last-Update: 2016-01-28 + +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -15,6 +15,8 @@ + + CPPFLAGS = @CPPFLAGS@ @DFLAGS@ + ++AM_CPPFLAGS = -DDATADIR="\"$(pkgdatadir)\"" ++ + INCLUDES = @HEADER_SEARCH_PATH@ + + wmclockmon_LDADD = @LIBRARY_SEARCH_PATH@ @XLIBS@ +--- a/wmclockmon-cal/Makefile.am ++++ b/wmclockmon-cal/Makefile.am +@@ -1,6 +1,6 @@ + bin_PROGRAMS = wmclockmon-cal + +-wmclockmon_SOURCES = \ ++wmclockmon_cal_SOURCES = \ + defines.h \ + main.c \ + main.h \ +--- a/wmclockmon-config/Makefile.am ++++ b/wmclockmon-config/Makefile.am +@@ -1,6 +1,6 @@ +-bin_PROGRAMS = wmclockmon ++bin_PROGRAMS = wmclockmon-config + +-wmclockmon_SOURCES = \ ++wmclockmon_config_SOURCES = \ + actions.c \ + actions.h \ + configfile.h \ diff -Nru wmclockmon-0.8.1/debian/rules wmclockmon-0.8.1/debian/rules --- wmclockmon-0.8.1/debian/rules 2016-02-19 00:47:16.000000000 +0000 +++ wmclockmon-0.8.1/debian/rules 2016-02-17 04:37:35.000000000 +0000 @@ -1,77 +1,6 @@ #!/usr/bin/make -f -TMP=$(CURDIR)/debian/wmclockmon +export DEB_BUILD_MAINT_OPTIONS = hardening=+all -CFLAGS = -Wall -g -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif - -configure: configure-stamp -configure-stamp: - dh_testdir - if [ -r /usr/share/misc/config.sub ]; then\ - mv $(CURDIR)/config.sub $(CURDIR)/config.sub.backup;\ - cp /usr/share/misc/config.sub $(CURDIR)/config.sub;\ - fi - if [ -r /usr/share/misc/config.guess ]; then\ - mv $(CURDIR)/config.guess $(CURDIR)/config.guess.backup;\ - cp /usr/share/misc/config.guess $(CURDIR)/config.guess;\ - fi - CFLAGS="$(CFLAGS)" ./configure --prefix=/usr --mandir=/usr/share/man - touch configure-stamp - -build: configure build-stamp -build-stamp: - dh_testdir - $(MAKE) - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp install-stamp configure-stamp - [ ! -f Makefile ] || $(MAKE) maintainer-clean - if [ -r $(CURDIR)/config.sub.backup ]; then\ - mv $(CURDIR)/config.sub.backup $(CURDIR)/config.sub;\ - fi - if [ -r $(CURDIR)/config.guess.backup ]; then\ - mv $(CURDIR)/config.guess.backup $(CURDIR)/config.guess;\ - fi - rm -f config.h config.log config.status stamp-h Makefile src/Makefile doc/Makefile wmclockmon-config/Makefile wmclockmon-cal/Makefile - dh_clean - -install: install-stamp -install-stamp: build-stamp - dh_testdir - dh_testroot - dh_prep - $(MAKE) install DESTDIR=$(TMP) - touch install-stamp - -# Build architecture-independent files here. -binary-indep: build install -# We have nothing to do by default. - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot - dh_installdocs - dh_installexamples - dh_installmenu - dh_installmanpages - dh_installchangelogs ChangeLog - dh_strip - dh_compress - dh_fixperms - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary +%: + dh $@ --with autoreconf diff -Nru wmclockmon-0.8.1/debian/source/format wmclockmon-0.8.1/debian/source/format --- wmclockmon-0.8.1/debian/source/format 1970-01-01 00:00:00.000000000 +0000 +++ wmclockmon-0.8.1/debian/source/format 2016-02-17 04:19:41.000000000 +0000 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru wmclockmon-0.8.1/debian/watch wmclockmon-0.8.1/debian/watch --- wmclockmon-0.8.1/debian/watch 2016-02-19 00:47:16.000000000 +0000 +++ wmclockmon-0.8.1/debian/watch 2016-02-17 04:19:41.000000000 +0000 @@ -1,3 +1,6 @@ -version=2 - -http://tnemeth.free.fr/projets/programmes/wmclockmon-(.*)\.tar\.gz +# Upstream webpage currently only lists an older version and the link is dead. +# The following *may* work if upstream eventually updates their webpage. +# ------------------------------------------------------------------------ +# version=3 +# http://tnemeth.free.fr/projets/dockapps.html \ +# programmes/wmclockmon-(.*)\.tar\.gz diff -Nru wmclockmon-0.8.1/src/main.c wmclockmon-0.8.1/src/main.c --- wmclockmon-0.8.1/src/main.c 2016-02-19 00:47:16.000000000 +0000 +++ wmclockmon-0.8.1/src/main.c 2005-04-07 09:37:43.000000000 +0000 @@ -251,12 +251,14 @@ static void print_help(char *prog); static void time_update(); static Bool raise_alarm(); +static Bool fexist(const char *filename); static Bool filestat(const char *filename, time_t *time, int mode); static int my_system(char *cmd, char *opt); void *xmalloc(size_t size); char *xstrdup(const char *string); static void alrm_add(Alarm **list, const char *value); static void free_alrm(Alarm **list); +static int nb_alrm(Alarm *list); static Bool alarms_on(Alarm *list); static void switch_alarms(Alarm *list); static Bool getbool(char *value); @@ -269,6 +271,9 @@ static void show_cal_file(int type); static void show_cal(); static char *robust_home(); +static void signal_reload(); + + int main(int argc, char **argv) { XEvent event; @@ -1321,6 +1326,17 @@ return False; } + +static Bool fexist(const char *filename) { + FILE *file; + + if ((file = fopen(filename, "r")) == NULL) return False; + fclose(file); + + return True; +} + + static Bool filestat(const char *filename, time_t *time, int mode) { struct stat s; time_t t = *time; @@ -1455,6 +1471,17 @@ } +static int nb_alrm(Alarm *list) { + Alarm *alrm = list; + int n = 0; + while (alrm) { + n++; + alrm = alrm->next; + } + return n; +} + + static Bool alarms_on(Alarm *list) { Alarm *alrm = list; diff -Nru wmclockmon-0.8.1/wmclockmon-cal/mainwindow.c wmclockmon-0.8.1/wmclockmon-cal/mainwindow.c --- wmclockmon-0.8.1/wmclockmon-cal/mainwindow.c 2016-02-19 00:47:16.000000000 +0000 +++ wmclockmon-0.8.1/wmclockmon-cal/mainwindow.c 2005-04-07 09:37:43.000000000 +0000 @@ -51,6 +51,7 @@ gtk_widget_hide(calendar); gtk_widget_hide(closewindow); gtk_widget_grab_default(GTK_WIDGET(cancel)); + gtk_widget_draw_default(GTK_WIDGET(cancel)); gtk_widget_grab_focus(GTK_WIDGET(edit)); gtk_widget_show(text_buttons); gtk_widget_show(edit); @@ -68,6 +69,7 @@ gtk_widget_hide(cancel); gtk_widget_show(calendar); gtk_widget_grab_default(GTK_WIDGET(closewindow)); + gtk_widget_draw_default(GTK_WIDGET(closewindow)); gtk_widget_grab_focus(GTK_WIDGET(closewindow)); gtk_widget_show(closewindow); } @@ -91,20 +93,13 @@ FILE *file; char *filename = get_file(datestr); - GtkTextIter iter; - GtkTextBuffer *buf; - - buf = GTK_TEXT_BUFFER(gtk_text_view_get_buffer(GTK_TEXT_VIEW(edit))); - gtk_text_buffer_get_end_iter(GTK_TEXT_BUFFER(gtk_text_view_get_buffer(GTK_TEXT_VIEW(edit))), &iter); - gtk_text_buffer_place_cursor(GTK_TEXT_BUFFER(gtk_text_view_get_buffer(GTK_TEXT_VIEW(edit))), &iter); - if ((file = fopen(filename, "r")) != NULL) { while (! feof(file)) { char line[MAXSTRLEN + 1]; bzero(line, MAXSTRLEN + 1); fgets(line, MAXSTRLEN, file); if (line[0] != 0) - gtk_text_buffer_insert(buf, &iter, line, -1); + gtk_text_insert(GTK_TEXT(edit), NULL, NULL, NULL, line, -1); } fclose(file); } @@ -133,7 +128,7 @@ static void to_button(int button) { - if (dateb == 0) dateb = button; + if (dateb == 0) dateb == button; if (button != dateb) { int b = dateb; dateb = button; @@ -143,7 +138,7 @@ static void set_buttons_text() { - unsigned int year, month, day; + int year, month, day; char datestr[MAXSTRLEN + 1]; bzero(datestr, MAXSTRLEN + 1); @@ -159,14 +154,21 @@ static void editor_flush() { - gtk_text_buffer_set_text(GTK_TEXT_BUFFER(gtk_text_view_get_buffer(GTK_TEXT_VIEW(edit))), "", 0); + int cont = TRUE; + + while (cont) { + cont = gtk_text_backward_delete(GTK_TEXT(edit), 1); + } + cont = TRUE; + while (cont) { + cont = gtk_text_forward_delete(GTK_TEXT(edit), 1); + } } static void editor_fill(int which) { - char *dstr; - GtkWidget *label = NULL; - GtkTextIter iter; + char *filename, *dstr; + GtkWidget *label; switch (which) { case UNIQUE: label = label_u; break; @@ -177,10 +179,11 @@ gtk_label_get(GTK_LABEL(label), &dstr); strcpy(daystr, dstr); to_button(which); + gtk_text_freeze(GTK_TEXT(edit)); editor_flush(); load_file(daystr); - gtk_text_buffer_get_end_iter(GTK_TEXT_BUFFER(gtk_text_view_get_buffer(GTK_TEXT_VIEW(edit))), &iter); - gtk_text_buffer_place_cursor(GTK_TEXT_BUFFER(gtk_text_view_get_buffer(GTK_TEXT_VIEW(edit))), &iter); + gtk_text_set_point(GTK_TEXT(edit), gtk_text_get_length(GTK_TEXT(edit))); + gtk_text_thaw(GTK_TEXT(edit)); } @@ -222,28 +225,23 @@ char *dirname = xmalloc(len + 2); struct stat stat_buf; - GtkTextIter ts, te; - gchar *tbuf; - int tlen; - - tlen = gtk_text_buffer_get_char_count(GTK_TEXT_BUFFER(gtk_text_view_get_buffer(GTK_TEXT_VIEW(edit)))); - gtk_text_buffer_get_bounds(GTK_TEXT_BUFFER(gtk_text_view_get_buffer(GTK_TEXT_VIEW(edit))), &ts, &te); - sprintf(dirname, "%s/%s", robust_home(), DEFAULT_CONFIGDIR); - if (tlen > 0) { + if (gtk_text_get_length(GTK_TEXT(edit)) > 0) { if (! ((stat(dirname, &stat_buf) == 0) && S_ISDIR(stat_buf.st_mode))) mkdir(dirname, 0755); if ((stat(dirname, &stat_buf) == 0) && S_ISDIR(stat_buf.st_mode)) { FILE *file = fopen(filename, "w"); - unsigned int year, month, day; + int year, month, day; if (file) { - tbuf = gtk_text_buffer_get_text(GTK_TEXT_BUFFER(gtk_text_view_get_buffer(GTK_TEXT_VIEW(edit))), &ts, &te, TRUE); - fprintf(file, "%s", tbuf); - g_free(tbuf); - fflush(file); - fclose(file); + int i; + for (i = 0 ; i < gtk_text_get_length(GTK_TEXT(edit)) ; i++) { + char t = GTK_TEXT_INDEX(GTK_TEXT(edit), i); + fprintf(file, "%c", t); + } + fflush(file); + fclose(file); } gtk_calendar_get_date(GTK_CALENDAR(calendar), &year, &month, &day); gtk_calendar_mark_day(GTK_CALENDAR(calendar), day); @@ -255,13 +253,15 @@ static void delete_file() { char *filename = get_file(daystr); - unsigned int year, month, day; + int year, month, day; unlink(filename); gtk_calendar_get_date(GTK_CALENDAR(calendar), &year, &month, &day); gtk_calendar_unmark_day(GTK_CALENDAR(calendar), day); FREE(filename); + gtk_text_freeze(GTK_TEXT(edit)); editor_flush(); + gtk_text_thaw(GTK_TEXT(edit)); } @@ -293,7 +293,7 @@ char startstr_u[9]; /* unique (full date) */ char startstr_y[9]; /* yearly date */ char startstr_m[9]; /* monthly date */ - unsigned int year, month, day; + int year, month, day; gtk_calendar_get_date(GTK_CALENDAR(calendar), &year, &month, &day); month++; @@ -357,10 +357,10 @@ GTK_SIGNAL_FUNC(mark_days), NULL); gtk_widget_show(calendar); - edit = gtk_text_view_new(); - gtk_text_view_set_editable(GTK_TEXT_VIEW(edit), TRUE); - gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(edit), GTK_WRAP_WORD_CHAR); - + edit = gtk_text_new(NULL, NULL); + gtk_text_set_editable(GTK_TEXT(edit), TRUE); + gtk_text_set_word_wrap(GTK_TEXT(edit), TRUE); + gtk_text_set_line_wrap(GTK_TEXT(edit), TRUE); gtk_box_pack_start(GTK_BOX(main_vbox), edit, TRUE, TRUE, 1); @@ -413,6 +413,7 @@ gtk_box_pack_start(GTK_BOX(buttons_hbox), closewindow, TRUE, TRUE, 0); GTK_WIDGET_SET_FLAGS(GTK_WIDGET(closewindow), GTK_CAN_DEFAULT); gtk_widget_grab_default(GTK_WIDGET(closewindow)); + gtk_widget_draw_default(GTK_WIDGET(closewindow)); gtk_widget_show(closewindow); diff -Nru wmclockmon-0.8.1/wmclockmon-cal/Makefile.in wmclockmon-0.8.1/wmclockmon-cal/Makefile.in --- wmclockmon-0.8.1/wmclockmon-cal/Makefile.in 2016-02-19 00:47:16.000000000 +0000 +++ wmclockmon-0.8.1/wmclockmon-cal/Makefile.in 2005-04-07 09:37:43.000000000 +0000 @@ -85,7 +85,7 @@ INCLUDES = @HEADER_SEARCH_PATH@ -wmclockmon_LDADD = @LIBRARY_SEARCH_PATH@ @XLIBS@ `pkg-config gtk+-2.0 --libs` +wmclockmon_LDADD = @LIBRARY_SEARCH_PATH@ @XLIBS@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @SETGID_FLAGS@ $(AM_INSTALL_PROGRAM_FLAGS) @@ -96,14 +96,14 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I.. -LDFLAGS = @LDFLAGS@ +LDFLAGS = @LDFLAGS@ `gtk-config --libs` X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ wmclockmon_OBJECTS = main.o mainwindow.o tools.o wmclockmon_DEPENDENCIES = wmclockmon_LDFLAGS = -CFLAGS = @CFLAGS@ `pkg-config gtk+-2.0 --cflags` +CFLAGS = @CFLAGS@ `gtk-config --cflags` COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ diff -Nru wmclockmon-0.8.1/wmclockmon-config/dialogs.c wmclockmon-0.8.1/wmclockmon-config/dialogs.c --- wmclockmon-0.8.1/wmclockmon-config/dialogs.c 2016-02-19 00:47:16.000000000 +0000 +++ wmclockmon-0.8.1/wmclockmon-config/dialogs.c 2005-04-07 09:37:43.000000000 +0000 @@ -38,6 +38,7 @@ bouton, TRUE, TRUE, 0); GTK_WIDGET_SET_FLAGS(GTK_WIDGET(bouton), GTK_CAN_DEFAULT); gtk_widget_grab_default(GTK_WIDGET(bouton)); + gtk_widget_draw_default(GTK_WIDGET(bouton)); gtk_widget_show(bouton); bouton = gtk_button_new_with_label("No"); @@ -95,6 +96,7 @@ bouton, TRUE, TRUE, 0); GTK_WIDGET_SET_FLAGS(GTK_WIDGET(bouton), GTK_CAN_DEFAULT); gtk_widget_grab_default(GTK_WIDGET(bouton)); + gtk_widget_draw_default(GTK_WIDGET(bouton)); gtk_widget_show(bouton); gtk_container_set_border_width(GTK_CONTAINER diff -Nru wmclockmon-0.8.1/wmclockmon-config/edit.c wmclockmon-0.8.1/wmclockmon-config/edit.c --- wmclockmon-0.8.1/wmclockmon-config/edit.c 2016-02-19 00:47:16.000000000 +0000 +++ wmclockmon-0.8.1/wmclockmon-config/edit.c 2005-04-07 09:37:43.000000000 +0000 @@ -76,6 +76,7 @@ bouton, TRUE, TRUE, 0); GTK_WIDGET_SET_FLAGS(GTK_WIDGET(bouton), GTK_CAN_DEFAULT); gtk_widget_grab_default(GTK_WIDGET(bouton)); + gtk_widget_draw_default(GTK_WIDGET(bouton)); gtk_widget_show(bouton); bouton = gtk_button_new_with_label("Cancel"); diff -Nru wmclockmon-0.8.1/wmclockmon-config/mainwindow.c wmclockmon-0.8.1/wmclockmon-config/mainwindow.c --- wmclockmon-0.8.1/wmclockmon-config/mainwindow.c 2016-02-19 00:47:16.000000000 +0000 +++ wmclockmon-0.8.1/wmclockmon-config/mainwindow.c 2005-04-07 09:37:43.000000000 +0000 @@ -10,9 +10,9 @@ #include "actions.h" -static GtkWidget *b_edit; -static GtkWidget *b_set; -static GtkWidget *b_remove; +static GtkWidget *edit; +static GtkWidget *set; +static GtkWidget *remove; static gint list_sel_cb (GtkCList *clist, gint row, @@ -20,9 +20,9 @@ GdkEventButton *event, void *data) { selected_row = row; - gtk_widget_set_sensitive(b_edit, TRUE); - gtk_widget_set_sensitive(b_set, TRUE); - gtk_widget_set_sensitive(b_remove, TRUE); + gtk_widget_set_sensitive(edit, TRUE); + gtk_widget_set_sensitive(set, TRUE); + gtk_widget_set_sensitive(remove, TRUE); return TRUE; } @@ -33,9 +33,9 @@ GdkEventButton *event, void *data) { selected_row = -1; - gtk_widget_set_sensitive(b_edit, FALSE); - gtk_widget_set_sensitive(b_set, FALSE); - gtk_widget_set_sensitive(b_remove, FALSE); + gtk_widget_set_sensitive(edit, FALSE); + gtk_widget_set_sensitive(set, FALSE); + gtk_widget_set_sensitive(remove, FALSE); return TRUE; } @@ -267,7 +267,7 @@ gtk_table_attach_defaults(GTK_TABLE(table), bouton, 0, 1, 1, 2); gtk_widget_set_sensitive(bouton, FALSE); gtk_widget_show(bouton); - b_edit = bouton; + edit = bouton; bouton = gtk_button_new_with_label(" Switch On/Off "); gtk_signal_connect(GTK_OBJECT(bouton), "clicked", @@ -275,7 +275,7 @@ gtk_table_attach_defaults(GTK_TABLE(table), bouton, 1, 2, 1, 2); gtk_widget_set_sensitive(bouton, FALSE); gtk_widget_show(bouton); - b_set = bouton; + set = bouton; bouton = gtk_button_new_with_label(" Remove alarm "); gtk_signal_connect(GTK_OBJECT(bouton), "clicked", @@ -283,7 +283,7 @@ gtk_table_attach_defaults(GTK_TABLE(table), bouton, 1, 2, 0, 1); gtk_widget_set_sensitive(bouton, FALSE); gtk_widget_show(bouton); - b_remove = bouton; + remove = bouton; label = gtk_label_new(" Alarms "); @@ -312,6 +312,7 @@ gtk_box_pack_start(GTK_BOX(buttons_hbox), bouton, TRUE, TRUE, 0); GTK_WIDGET_SET_FLAGS(GTK_WIDGET(bouton), GTK_CAN_DEFAULT); gtk_widget_grab_default(GTK_WIDGET(bouton)); + gtk_widget_draw_default(GTK_WIDGET(bouton)); gtk_widget_show(bouton); bouton = gtk_button_new_with_label(" Cancel "); diff -Nru wmclockmon-0.8.1/wmclockmon-config/Makefile.in wmclockmon-0.8.1/wmclockmon-config/Makefile.in --- wmclockmon-0.8.1/wmclockmon-config/Makefile.in 2016-02-19 00:47:16.000000000 +0000 +++ wmclockmon-0.8.1/wmclockmon-config/Makefile.in 2005-04-07 09:37:43.000000000 +0000 @@ -85,7 +85,7 @@ INCLUDES = @HEADER_SEARCH_PATH@ -wmclockmon_LDADD = @LIBRARY_SEARCH_PATH@ @XLIBS@ `pkg-config gtk+-2.0 --libs` +wmclockmon_LDADD = @LIBRARY_SEARCH_PATH@ @XLIBS@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @SETGID_FLAGS@ $(AM_INSTALL_PROGRAM_FLAGS) @@ -96,14 +96,14 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I.. -LDFLAGS = @LDFLAGS@ +LDFLAGS = @LDFLAGS@ `gtk-config --libs` X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ wmclockmon_OBJECTS = actions.o dialogs.o edit.o main.o mainwindow.o tools.o wmclockmon_DEPENDENCIES = wmclockmon_LDFLAGS = -CFLAGS = @CFLAGS@ `pkg-config gtk+-2.0 --cflags` +CFLAGS = @CFLAGS@ `gtk-config --cflags` COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@