[Xfce4-commits] r27327 - xfconf/trunk/xfsettingsd
Author: jannis Date: 2008-07-17 14:40:16 + (Thu, 17 Jul 2008) New Revision: 27327 Modified: xfconf/trunk/xfsettingsd/registry.c Log: xfsettingsd/registry.c: Fix memory leaks and a crash due to invalid free'ing of a GError (use g_error_free instead of g_free). Modified: xfconf/trunk/xfsettingsd/registry.c === --- xfconf/trunk/xfsettingsd/registry.c 2008-07-17 13:49:30 UTC (rev 27326) +++ xfconf/trunk/xfsettingsd/registry.c 2008-07-17 14:40:16 UTC (rev 27327) @@ -371,7 +371,7 @@ /* print warning */ g_critical (Failed to spawn xrdb: %s, error-message); -g_free (error); +g_error_free (error); } void @@ -533,6 +533,8 @@ 8, PropModeReplace, buffer, buf_len); registry-priv-last_change_serial = registry-priv-serial; + +g_free (buffer); } XSettingsRegistry * @@ -703,6 +705,7 @@ { XfconfChannel *channel = registry-priv-channel; XSettingsRegistryEntry *entry = properties; +gchar *str; while (entry-name) { @@ -717,7 +720,9 @@ g_value_set_int(entry-value, xfconf_channel_get_int(channel, name, g_value_get_int(entry-value))); break; case G_TYPE_STRING: -g_value_set_string(entry-value, xfconf_channel_get_string(channel, name, g_value_get_string(entry-value))); +str = xfconf_channel_get_string(channel, name, g_value_get_string(entry-value)); +g_value_set_string(entry-value, str); +g_free(str); break; case G_TYPE_BOOLEAN: g_value_set_boolean(entry-value, xfconf_channel_get_bool(channel, name, g_value_get_boolean(entry-value))); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r27328 - xfconf/trunk/xfconfd
Author: jannis Date: 2008-07-17 15:03:54 + (Thu, 17 Jul 2008) New Revision: 27328 Modified: xfconf/trunk/xfconfd/main.c xfconf/trunk/xfconfd/xfconf-backend-perchannel-xml.c Log: xfconfd/main.c, xfconfd/xfconf-backend-perchannel-xml.c: Fix a few small memory leaks and add a comment about one I don't know how to fix. Modified: xfconf/trunk/xfconfd/main.c === --- xfconf/trunk/xfconfd/main.c 2008-07-17 14:40:16 UTC (rev 27327) +++ xfconf/trunk/xfconfd/main.c 2008-07-17 15:03:54 UTC (rev 27328) @@ -161,8 +161,11 @@ g_option_context_add_main_entries(opt_ctx, options, PACKAGE); if(!g_option_context_parse(opt_ctx, argc, argv, error)) { g_printerr(Error parsing options: %s\n, error-message); +g_error_free(error); +g_option_context_free(opt_ctx); return 1; } +g_option_context_free(opt_ctx); if(print_version) { g_print(Xfconfd version VERSION \n); @@ -199,6 +202,7 @@ xfconfd = xfconf_daemon_new_unique(backends, error); if(!xfconfd) { g_printerr(Xfconfd failed to start: %s\n, error-message); +g_error_free(error); return 1; } g_strfreev(backends); Modified: xfconf/trunk/xfconfd/xfconf-backend-perchannel-xml.c === --- xfconf/trunk/xfconfd/xfconf-backend-perchannel-xml.c2008-07-17 14:40:16 UTC (rev 27327) +++ xfconf/trunk/xfconfd/xfconf-backend-perchannel-xml.c2008-07-17 15:03:54 UTC (rev 27328) @@ -897,6 +897,7 @@ } /* FIXME: validate name for valid chars */ +/* FIXME: Is this used at all? Where does it need to be free'd? */ state-channel_name = g_strdup(name); if((locked *locked) || (unlocked *unlocked)) { ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r27330 - in libexo/trunk: . exo-csource
Author: nick Date: 2008-07-17 18:16:34 + (Thu, 17 Jul 2008) New Revision: 27330 Modified: libexo/trunk/ChangeLog libexo/trunk/configure.in.in libexo/trunk/exo-csource/main.c Log: * exo-csource/main.c: Don't strip text between nodes with --strip-content. This will make stripping work on glade files. * configure.in.in: Version bump from 0.3.7 to 0.3.7.1. Modified: libexo/trunk/ChangeLog === --- libexo/trunk/ChangeLog 2008-07-17 15:25:43 UTC (rev 27329) +++ libexo/trunk/ChangeLog 2008-07-17 18:16:34 UTC (rev 27330) @@ -1,3 +1,10 @@ +2008-07-17 Nick Schermer [EMAIL PROTECTED] + + * exo-csource/main.c: Don't strip text between nodes + with --strip-content. This will make stripping work + on glade files. + * configure.in.in: Version bump from 0.3.7 to 0.3.7.1. + 2007-12-02 Benedikt Meurer [EMAIL PROTECTED] * configure.in.in: Post-release version bump. Modified: libexo/trunk/configure.in.in === --- libexo/trunk/configure.in.in2008-07-17 15:25:43 UTC (rev 27329) +++ libexo/trunk/configure.in.in2008-07-17 18:16:34 UTC (rev 27330) @@ -13,7 +13,7 @@ m4_define([libexo_version_major], [0]) m4_define([libexo_version_minor], [3]) m4_define([libexo_version_micro], [7]) -m4_define([libexo_version_nano], []) +m4_define([libexo_version_nano], [1]) m4_define([libexo_version_build], [EMAIL PROTECTED]@]) m4_define([libexo_version_tag], [svn]) m4_define([libexo_version], [libexo_version_major().libexo_version_minor().libexo_version_micro()ifelse(libexo_version_nano(), [], [], [.libexo_version_nano()])ifelse(libexo_version_tag(), [svn], [libexo_version_tag()-libexo_version_build()], [libexo_version_tag()])]) Modified: libexo/trunk/exo-csource/main.c === --- libexo/trunk/exo-csource/main.c 2008-07-17 15:25:43 UTC (rev 27329) +++ libexo/trunk/exo-csource/main.c 2008-07-17 18:16:34 UTC (rev 27330) @@ -221,6 +221,8 @@ inside_content = TRUE; else if (inside_content *p == '') inside_content = FALSE; + else if (inside_content !g_ascii_isspace (*p)) +inside_content = FALSE; else if (inside_content) continue; } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r27331 - in xfce4-settings/trunk: . dialogs/accessibility-settings dialogs/appearance-settings dialogs/display-settings dialogs/keyboard-settings dialogs/mouse-settings
Author: nick Date: 2008-07-17 18:19:09 + (Thu, 17 Jul 2008) New Revision: 27331 Modified: xfce4-settings/trunk/ChangeLog xfce4-settings/trunk/configure.ac.in xfce4-settings/trunk/dialogs/accessibility-settings/Makefile.am xfce4-settings/trunk/dialogs/appearance-settings/Makefile.am xfce4-settings/trunk/dialogs/display-settings/Makefile.am xfce4-settings/trunk/dialogs/keyboard-settings/Makefile.am xfce4-settings/trunk/dialogs/mouse-settings/Makefile.am Log: * dialogs/display-settings/Makefile.am, dialogs/accessibility-settings/Makefile.am, dialogs/mouse-settings/Makefile.am, dialogs/appearance-settings/Makefile.am, dialogs/keyboard-settings/Makefile.am: Add --strip-comments --strip-content to exo-csource for generating glade headers. * configure.ac.in: Bump exo version to 0.3.7.1 since stripping glade files on older versions is broken. Modified: xfce4-settings/trunk/ChangeLog === --- xfce4-settings/trunk/ChangeLog 2008-07-17 18:16:34 UTC (rev 27330) +++ xfce4-settings/trunk/ChangeLog 2008-07-17 18:19:09 UTC (rev 27331) @@ -1,3 +1,14 @@ +2008-07-17 Nick Schermer [EMAIL PROTECTED] + + * dialogs/display-settings/Makefile.am, + dialogs/accessibility-settings/Makefile.am, + dialogs/mouse-settings/Makefile.am, + dialogs/appearance-settings/Makefile.am, + dialogs/keyboard-settings/Makefile.am: Add --strip-comments + --strip-content to exo-csource for generating glade headers. + * configure.ac.in: Bump exo version to 0.3.7.1 since stripping + glade files on older versions is broken. + 2008-07-17 Jannis Pohlmann [EMAIL PROTECTED] * dialogs/keyboard-settings/command-dialog.c: Make entry activate the Modified: xfce4-settings/trunk/configure.ac.in === --- xfce4-settings/trunk/configure.ac.in2008-07-17 18:16:34 UTC (rev 27330) +++ xfce4-settings/trunk/configure.ac.in2008-07-17 18:19:09 UTC (rev 27331) @@ -70,7 +70,7 @@ dnl *** dnl *** Check for required packages *** dnl *** -XDT_CHECK_PACKAGE([EXO], [exo-0.3], [0.3.0]) +XDT_CHECK_PACKAGE([EXO], [exo-0.3], [0.3.7.1]) XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.10.0]) XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.12.0]) XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.12.0]) Modified: xfce4-settings/trunk/dialogs/accessibility-settings/Makefile.am === --- xfce4-settings/trunk/dialogs/accessibility-settings/Makefile.am 2008-07-17 18:16:34 UTC (rev 27330) +++ xfce4-settings/trunk/dialogs/accessibility-settings/Makefile.am 2008-07-17 18:19:09 UTC (rev 27331) @@ -41,7 +41,7 @@ accessibility-dialog_glade.h accessibility-dialog_glade.h: accessibility-dialog.glade - exo-csource --static --name=accessibility_dialog_glade $ $@ + exo-csource --static --strip-comments --strip-content --name=accessibility_dialog_glade $ $@ endif Modified: xfce4-settings/trunk/dialogs/appearance-settings/Makefile.am === --- xfce4-settings/trunk/dialogs/appearance-settings/Makefile.am 2008-07-17 18:16:34 UTC (rev 27330) +++ xfce4-settings/trunk/dialogs/appearance-settings/Makefile.am 2008-07-17 18:19:09 UTC (rev 27331) @@ -42,7 +42,7 @@ appearance-dialog_glade.h appearance-dialog_glade.h: appearance-dialog.glade - exo-csource --static --name=appearance_dialog_glade $ $@ + exo-csource --static --strip-comments --strip-content --name=appearance_dialog_glade $ $@ endif Modified: xfce4-settings/trunk/dialogs/display-settings/Makefile.am === --- xfce4-settings/trunk/dialogs/display-settings/Makefile.am 2008-07-17 18:16:34 UTC (rev 27330) +++ xfce4-settings/trunk/dialogs/display-settings/Makefile.am 2008-07-17 18:19:09 UTC (rev 27331) @@ -45,7 +45,7 @@ display-dialog_glade.h display-dialog_glade.h: display-dialog.glade - exo-csource --static --name=display_dialog_glade $ $@ + exo-csource --static --strip-comments --strip-content --name=display_dialog_glade $ $@ endif Modified: xfce4-settings/trunk/dialogs/keyboard-settings/Makefile.am === --- xfce4-settings/trunk/dialogs/keyboard-settings/Makefile.am 2008-07-17 18:16:34 UTC (rev 27330) +++ xfce4-settings/trunk/dialogs/keyboard-settings/Makefile.am 2008-07-17 18:19:09 UTC (rev 27331) @@ -46,7 +46,7 @@ keyboard-dialog_glade.h keyboard-dialog_glade.h: keyboard-dialog.glade - exo-csource --static --name=keyboard_dialog_glade $ $@ + exo-csource --static --strip-comments
[Xfce4-commits] r27332 - xfconf/trunk/xfconfd
Author: jannis Date: 2008-07-17 19:31:41 + (Thu, 17 Jul 2008) New Revision: 27332 Modified: xfconf/trunk/xfconfd/xfconf-backend-perchannel-xml.c Log: xfconfd/xfconf-backend-perchannel-xml.c: Fix crash when removing the last property of a channel. The check whether we are at the root node (the one with prop-name == /) was done after accessing the parent of the current node (which is NULL for the root node). Modified: xfconf/trunk/xfconfd/xfconf-backend-perchannel-xml.c === --- xfconf/trunk/xfconfd/xfconf-backend-perchannel-xml.c2008-07-17 18:19:09 UTC (rev 27331) +++ xfconf/trunk/xfconfd/xfconf-backend-perchannel-xml.c2008-07-17 19:31:41 UTC (rev 27332) @@ -712,11 +712,11 @@ g_node_unlink(node); xfconf_proptree_destroy(node); -/* remove parents without values until we find a parent with - * a value or any children */ +/* remove parents without values until we find the root node or + * a parent with a value or any children */ while(parent) { prop = parent-data; -if(!G_IS_VALUE(prop-value) !parent-children) { +if(!G_IS_VALUE(prop-value) !parent-children strcmp(prop-name, /) != 0) { GNode *tmp = parent; parent = parent-parent; @@ -724,11 +724,6 @@ g_node_unlink(tmp); xfconf_proptree_destroy(tmp); - -/* but don't remove the root node */ -prop = parent-data; -if(!strcmp(/, prop-name)) -parent = NULL; } else parent = NULL; } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r27333 - squeeze/trunk/libsqueeze
Author: peter Date: 2008-07-17 22:01:30 + (Thu, 17 Jul 2008) New Revision: 27333 Added: squeeze/trunk/libsqueeze/command-option.c squeeze/trunk/libsqueeze/command-option.h Modified: squeeze/trunk/libsqueeze/Makefile.am squeeze/trunk/libsqueeze/archive-iter-pool.h squeeze/trunk/libsqueeze/archive.c squeeze/trunk/libsqueeze/archive.h squeeze/trunk/libsqueeze/command-queue.c squeeze/trunk/libsqueeze/libsqueeze.h squeeze/trunk/libsqueeze/support-reader.c squeeze/trunk/libsqueeze/support-template.h Log: Command options added (not completely finnished) Modified: squeeze/trunk/libsqueeze/Makefile.am === --- squeeze/trunk/libsqueeze/Makefile.am2008-07-17 19:31:41 UTC (rev 27332) +++ squeeze/trunk/libsqueeze/Makefile.am2008-07-17 22:01:30 UTC (rev 27333) @@ -6,6 +6,7 @@ archive-iter.c archive-iter.h \ archive-tempfs.c archive-tempfs.h \ command-queue.c command-queue.h \ + command-option.c command-option.h \ internals.c internals.h \ libsqueeze.c libsqueeze.h \ libsqueeze-view.h \ Modified: squeeze/trunk/libsqueeze/archive-iter-pool.h === --- squeeze/trunk/libsqueeze/archive-iter-pool.h2008-07-17 19:31:41 UTC (rev 27332) +++ squeeze/trunk/libsqueeze/archive-iter-pool.h2008-07-17 22:01:30 UTC (rev 27333) @@ -17,26 +17,6 @@ #define __ARCHIVE_ITER_POOL_H__ G_BEGIN_DECLS -#define LSQ_TYPE_ARCHIVE lsq_archive_get_type() - -#define LSQ_ARCHIVE(obj)( \ - G_TYPE_CHECK_INSTANCE_CAST ((obj), \ - LSQ_TYPE_ARCHIVE, \ - LSQArchive)) - -#define LSQ_IS_ARCHIVE(obj) ( \ - G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ - LSQ_TYPE_ARCHIVE)) - -#define LSQ_ARCHIVE_CLASS(class) ( \ - G_TYPE_CHECK_CLASS_CAST ((class),\ - LSQ_TYPE_ARCHIVE, \ - LSQArchiveClass)) - -#define LSQ_IS_ARCHIVE_CLASS(class) ( \ - G_TYPE_CHECK_CLASS_TYPE ((class), \ - LSQ_TYPE_ARCHIVE)) - typedef struct _LSQArchiveIter LSQArchiveIter; typedef struct _LSQArchiveEntry LSQArchiveEntry; typedef struct _LSQArchiveIterPool LSQArchiveIterPool; Modified: squeeze/trunk/libsqueeze/archive.c === --- squeeze/trunk/libsqueeze/archive.c 2008-07-17 19:31:41 UTC (rev 27332) +++ squeeze/trunk/libsqueeze/archive.c 2008-07-17 22:01:30 UTC (rev 27333) @@ -437,3 +437,28 @@ return TRUE; } +LSQCommandOptionPair ** +lsq_archive_get_command_options(LSQArchive *archive, LSQCommandType type) +{ +LSQCommandOptionPair **option_list = NULL; + +LSQSupportTemplate *s_template = archive-priv-s_template; + +switch (type) +{ +case LSQ_COMMAND_TYPE_ADD: +option_list = lsq_command_option_create_pair(s_template-add_options); +break; +case LSQ_COMMAND_TYPE_REMOVE: +option_list = lsq_command_option_create_pair(s_template-remove_options); +break; +case LSQ_COMMAND_TYPE_EXTRACT: +option_list = lsq_command_option_create_pair(s_template-extract_options); +break; +default: +break; +} + +return option_list; +} + Modified: squeeze/trunk/libsqueeze/archive.h === --- squeeze/trunk/libsqueeze/archive.h 2008-07-17 19:31:41 UTC (rev 27332) +++ squeeze/trunk/libsqueeze/archive.h 2008-07-17 22:01:30 UTC (rev 27333) @@ -110,6 +110,9 @@ gboolean lsq_archive_operate(LSQArchive *archive, LSQCommandType type, const gchar **, const gchar *); +LSQCommandOptionPair ** +lsq_archive_get_command_options(LSQArchive *archive, LSQCommandType type); + const gchar* lsq_archive_get_state_msg(const LSQArchive *archive); Added: squeeze/trunk/libsqueeze/command-option.c === --- squeeze/trunk/libsqueeze/command-option.c (rev 0) +++ squeeze/trunk/libsqueeze/command-option.c 2008-07-17 22:01:30 UTC (rev 27333) @@ -0,0 +1,267 @@ +/* + * This program 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 program 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 Library General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with
[Xfce4-commits] r27334 - in xfce4-settings/trunk: . dialogs/keyboard-settings
Author: jannis Date: 2008-07-18 00:28:43 + (Fri, 18 Jul 2008) New Revision: 27334 Modified: xfce4-settings/trunk/ChangeLog xfce4-settings/trunk/TODO xfce4-settings/trunk/dialogs/keyboard-settings/main.c xfce4-settings/trunk/dialogs/keyboard-settings/shortcut-dialog.c Log: * dialogs/keyboard-settings/main.c: Fix some issues with multiple row selection in the shortcuts tree view. Properly destroy the command dialog when adding a new command but pressing the cancel button in the command dialog. * dialogs/keyboard-settings/shortcut-dialog.c: Remove the No shortcut button as we don't support empty shortcut properties anyway. Modified: xfce4-settings/trunk/ChangeLog === --- xfce4-settings/trunk/ChangeLog 2008-07-17 22:01:30 UTC (rev 27333) +++ xfce4-settings/trunk/ChangeLog 2008-07-18 00:28:43 UTC (rev 27334) @@ -1,3 +1,13 @@ +2008-07-18 Jannis Pohlmann [EMAIL PROTECTED] + + * dialogs/keyboard-settings/main.c: Fix some issues with multiple row + selection in the shortcuts tree view. Properly destroy the command + dialog when adding a new command but pressing the cancel button in + the command dialog. + * dialogs/keyboard-settings/shortcut-dialog.c: Remove the No + shortcut button as we don't support empty shortcut properties + anyway. + 2008-07-17 Nick Schermer [EMAIL PROTECTED] * dialogs/display-settings/Makefile.am, Modified: xfce4-settings/trunk/TODO === --- xfce4-settings/trunk/TODO 2008-07-17 22:01:30 UTC (rev 27333) +++ xfce4-settings/trunk/TODO 2008-07-18 00:28:43 UTC (rev 27334) @@ -1,6 +1,7 @@ Keyboard settings + * Use XfceTitledDialog for the ShortcutDialog. * The default values of the sliders don't make sence. I think we should also show the slider value and add a tooltip to the slide what the value actually stands for, like in the mouse dialog. Modified: xfce4-settings/trunk/dialogs/keyboard-settings/main.c === --- xfce4-settings/trunk/dialogs/keyboard-settings/main.c 2008-07-17 22:01:30 UTC (rev 27333) +++ xfce4-settings/trunk/dialogs/keyboard-settings/main.c 2008-07-18 00:28:43 UTC (rev 27334) @@ -59,10 +59,7 @@ -gboolean opt_version = FALSE; - - - +static gboolean opt_version = FALSE; static GOptionEntry entries[] = { { version, 'v', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, opt_version, N_(Version information), NULL }, { NULL } @@ -70,6 +67,14 @@ +struct TreeViewInfo +{ + GtkTreeView *view; + GtkTreeIter *iter; +}; + + + static void keyboard_settings_box_sensitivity (GtkToggleButton *button, GtkWidget *box) @@ -146,9 +151,9 @@ static gboolean -keyboard_settings_validate_shortcut (ShortcutDialog *dialog, - const gchar*shortcut, - GtkTreeView*tree_view) +keyboard_settings_validate_shortcut (ShortcutDialog *dialog, + const gchar *shortcut, + struct TreeViewInfo *info) { GtkTreeSelection *selection; GtkTreeModel *model; @@ -157,31 +162,40 @@ gchar*current_shortcut; gchar*property; -#if 1 - /* Ignore raw 'Return' since that may have been used to activate the shortcut row */ - if (G_UNLIKELY (g_utf8_collate (shortcut, Return) == 0 - || g_utf8_collate (shortcut, space) == 0)) + /* Ignore raw 'Return' and 'space' since that may have been used to activate the shortcut row */ + if (G_UNLIKELY (g_utf8_collate (shortcut, Return) == 0 || g_utf8_collate (shortcut, space) == 0)) return FALSE; -#endif - selection = gtk_tree_view_get_selection (tree_view); + /* Build property name */ + property = g_strdup_printf (/%s, shortcut); - if (G_LIKELY (gtk_tree_selection_get_selected (selection, model, iter))) + if (G_LIKELY (info-iter != NULL)) { - gtk_tree_model_get (model, iter, SHORTCUT_COLUMN, current_shortcut, -1); + /* Get shortcut of the row we're currently editing */ + gtk_tree_model_get (gtk_tree_view_get_model (info-view), info-iter, SHORTCUT_COLUMN, current_shortcut, -1); - property = g_strdup_printf (/%s, shortcut); - + /* Don't accept the shortcut if it already is being used somewhere else (and not by the current row) */ if (G_UNLIKELY (xfconf_channel_has_property (kbd_channel, property) g_utf8_collate (current_shortcut, shortcut) != 0)) { xfce_err (_(Keyboard shortcut '%s' is already being used for something else.), shortcut); shortcut_accepted = FALSE;