[Xfce4-commits] r26506 - xarchiver/trunk/src
Author: colossus Date: 2007-12-26 22:54:08 + (Wed, 26 Dec 2007) New Revision: 26506 Modified: xarchiver/trunk/src/add_dialog.c xarchiver/trunk/src/archive.c xarchiver/trunk/src/bzip2.c xarchiver/trunk/src/bzip2.h xarchiver/trunk/src/extract_dialog.c xarchiver/trunk/src/lzma.c xarchiver/trunk/src/lzma.h xarchiver/trunk/src/pref_dialog.c xarchiver/trunk/src/pref_dialog.h xarchiver/trunk/src/tar.c xarchiver/trunk/src/window.c Log: Removed options for storing add and extract dialogs settings in the pref dialog. Fixed crash in xa_extract_tar_without_directories() because of the new xa_run_command(). Improved code for handling extensions when adding or deleting from tar.bz2/.gz/.lzma archives. Modified: xarchiver/trunk/src/add_dialog.c === --- xarchiver/trunk/src/add_dialog.c2007-12-26 06:59:39 UTC (rev 26505) +++ xarchiver/trunk/src/add_dialog.c2007-12-26 22:54:08 UTC (rev 26506) @@ -91,6 +91,7 @@ gtk_radio_button_set_group (GTK_RADIO_BUTTON (add_dialog-no_store_path), add_dialog-path_group); add_dialog-path_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (add_dialog-no_store_path)); gtk_button_set_focus_on_click (GTK_BUTTON (add_dialog-no_store_path), FALSE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(add_dialog-no_store_path),TRUE); /* 7z doesn't appear to let the user chooses if storing full paths */ if (archive-type == XARCHIVETYPE_7ZIP || archive-type == XARCHIVETYPE_BZIP2 || archive-type == XARCHIVETYPE_GZIP || archive-type == XARCHIVETYPE_LZMA) @@ -100,7 +101,6 @@ gtk_widget_set_sensitive(add_dialog-no_store_path,FALSE); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (add_dialog-no_store_path), TRUE); } - //gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(add_dialog-no_store_path),TRUE); /* Options page */ option_notebook_vbox = gtk_vbox_new (FALSE, 0); @@ -482,8 +482,8 @@ break; case XARCHIVETYPE_TAR_BZ2: - if ( g_file_test ( archive-escaped_path , G_FILE_TEST_EXISTS ) ) - xa_add_delete_tar_bzip2_gzip ( names , archive, 0 , 1 ); + if ( g_file_test (archive-escaped_path,G_FILE_TEST_EXISTS)) + xa_add_delete_tar_bzip2_gzip_lzma (names,archive,1); else command = g_strconcat (tar, , archive-add_recurse ? : --no-recursion , @@ -493,8 +493,8 @@ break; case XARCHIVETYPE_TAR_GZ: - if ( g_file_test ( archive-escaped_path , G_FILE_TEST_EXISTS ) ) - xa_add_delete_tar_bzip2_gzip ( names , archive, 1 , 1 ); + if ( g_file_test (archive-escaped_path,G_FILE_TEST_EXISTS)) + xa_add_delete_tar_bzip2_gzip_lzma (names,archive,1); /* This is executed when the archive is newly created */ else command = g_strconcat (tar, , @@ -506,7 +506,7 @@ case XARCHIVETYPE_TAR_LZMA: if ( g_file_test ( archive-escaped_path , G_FILE_TEST_EXISTS ) ) - xa_add_delete_tar_lzma ( names , archive, 1 ); + xa_add_delete_tar_bzip2_gzip_lzma (names,archive,1); else command = g_strconcat (tar, , archive-add_recurse ? : --no-recursion , Modified: xarchiver/trunk/src/archive.c === --- xarchiver/trunk/src/archive.c 2007-12-26 06:59:39 UTC (rev 26505) +++ xarchiver/trunk/src/archive.c 2007-12-26 22:54:08 UTC (rev 26506) @@ -303,7 +303,7 @@ gtk_widget_show (viewport2); while (_commands) { - g_print (%s\n,_commands-data); + g_print (%s\n,(gchar*)_commands-data); xa_spawn_async_process (archive,_commands-data); if (archive-child_pid == 0) break; @@ -603,6 +603,7 @@ void xa_entries_to_filelist(XEntry *entry,GSList **p_file_list,gchar *current_path) { gchar *full_path = NULL; + gchar *quoted_path = NULL; if (entry == NULL) return; @@ -624,7 +625,10 @@ } /* This is a file, add this entry with a full pathname */ else - *p_file_list = g_slist_append(*p_file_list, full_path); + { + quoted_path = g_shell_quote(full_path); + *p_file_list = g_slist_append(*p_file_list,quoted_path); + } return; } Modified: xarchiver/trunk/src/bzip2.c === --- xarchiver/trunk/src/bzip2.c
[Xfce4-commits] r26507 - in libxfce4menu/trunk: . libxfce4menu
Author: jannis Date: 2007-12-27 00:13:05 + (Thu, 27 Dec 2007) New Revision: 26507 Modified: libxfce4menu/trunk/ChangeLog libxfce4menu/trunk/libxfce4menu/xfce-menu-monitor.c Log: * libxfce4menu/xfce-menu-monitor.c: Use the KEY, not the VALUE pointer to remove items from the shared handle hash table. In this case, use the directory string instead of the shared handle. This should fix the issue we've had with monitoring directories only. xfce_menu_item_has_category (XfceMenuItem *, const char *). This can be used in combination with file monitoring: Once something has changed a) destroy the current menu, b) invalidate the cache and c) create the menu again. Modified: libxfce4menu/trunk/ChangeLog === --- libxfce4menu/trunk/ChangeLog2007-12-26 22:54:08 UTC (rev 26506) +++ libxfce4menu/trunk/ChangeLog2007-12-27 00:13:05 UTC (rev 26507) @@ -1,3 +1,9 @@ +2007-12-27 Jannis Pohlmann [EMAIL PROTECTED] + * libxfce4menu/xfce-menu-monitor.c: Use the KEY, not the VALUE pointer + to remove items from the shared handle hash table. In this case, use + the directory string instead of the shared handle. This should fix + the issue we've had with monitoring directories only. + 2007-12-23 Jannis Pohlmann [EMAIL PROTECTED] * libxfce4menu/xfce-menu-item.{c,h}: Add support for GenericName as @@ -2,8 +8,8 @@ requested by Brian. Also add a convenience function - xfce_menu_item_has_category (XfceMenuItem *, const char *). + xfce_menu_item_has_category (XfceMenuItem *, const char *). * libxfce4menu/xfce-menu-item-cache.c: Re-add caching features, but now also allow the cache to be invalidated using _item_cache_invalidate(). - This can be used in combination with file monitoring: Once something - has changed a) destroy the current menu, b) invalidate the cache and - c) create the menu again. + This can be used in combination with file monitoring: Once something + has changed a) destroy the current menu, b) invalidate the cache and + c) create the menu again. @@ -724,3 +730,5 @@ Abort setting properties if new values are equal to the old ones. * tests/load-root-menu-test.c: Display only_unallocated, delete and directory_dirs information. + +vim:set sw=8 sts=8 ts=8 noexpandtab: Modified: libxfce4menu/trunk/libxfce4menu/xfce-menu-monitor.c === --- libxfce4menu/trunk/libxfce4menu/xfce-menu-monitor.c 2007-12-26 22:54:08 UTC (rev 26506) +++ libxfce4menu/trunk/libxfce4menu/xfce-menu-monitor.c 2007-12-27 00:13:05 UTC (rev 26507) @@ -243,7 +243,7 @@ xfce_menu_monitor_vtable.remove_monitor (menu, shared_handle-monitor_handle); /* Remove directory handle from the hash table and destroy it */ - g_hash_table_remove (xfce_menu_monitor_shared_handles, shared_handle); + g_hash_table_remove (xfce_menu_monitor_shared_handles, directory); } } } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r26508 - in xfdesktop/trunk: . modules/menu
Author: kelnos Date: 2007-12-27 00:49:02 + (Thu, 27 Dec 2007) New Revision: 26508 Modified: xfdesktop/trunk/configure.ac.in xfdesktop/trunk/modules/menu/desktop-menu.c Log: fix file monitoring; don't watch directories that don't exist Modified: xfdesktop/trunk/configure.ac.in === --- xfdesktop/trunk/configure.ac.in 2007-12-27 00:13:05 UTC (rev 26507) +++ xfdesktop/trunk/configure.ac.in 2007-12-27 00:49:02 UTC (rev 26508) @@ -13,7 +13,7 @@ dnl minimum required versions m4_define([gtk_minimum_version], [2.6.0]) -m4_define([libxfce4util_minimum_version], [4.5.0svn-r26500]) +m4_define([libxfce4util_minimum_version], [4.5.0svn-r26507]) m4_define([xfce_minimum_version], [4.4.1]) m4_define([xfce4menu_minimum_version], [0.1.0svn-r26163]) m4_define([exo_minimum_version], [0.3.2]) Modified: xfdesktop/trunk/modules/menu/desktop-menu.c === --- xfdesktop/trunk/modules/menu/desktop-menu.c 2007-12-27 00:13:05 UTC (rev 26507) +++ xfdesktop/trunk/modules/menu/desktop-menu.c 2007-12-27 00:49:02 UTC (rev 26508) @@ -117,7 +117,13 @@ XfceDesktopMenu *desktop_menu = user_data; XfceMenuItemCache *cache = xfce_menu_item_cache_get_default(); -TRACE(entering (%s), thunar_vfs_path_get_name(event_path)); +#ifdef DEBUG +{ +gchar buf[1024]; +thunar_vfs_path_to_string(event_path, buf, sizeof(buf), NULL); +TRACE(entering (%d,%s), event, buf); +} +#endif xfce_menu_item_cache_invalidate(cache); _generate_menu(desktop_menu, FALSE); @@ -157,19 +163,21 @@ { XfceDesktopMenu *desktop_menu = user_data; ThunarVfsPath *path; -ThunarVfsMonitor *monitor = thunar_vfs_monitor_get_default(); ThunarVfsMonitorHandle *mhandle = NULL; +if(!g_file_test(filename, G_FILE_TEST_IS_DIR)) +return NULL; + path = thunar_vfs_path_new(filename, NULL); if(path) { +ThunarVfsMonitor *monitor = thunar_vfs_monitor_get_default(); mhandle = thunar_vfs_monitor_add_directory(monitor, path, desktop_menu_something_changed, desktop_menu); thunar_vfs_path_unref(path); +g_object_unref(G_OBJECT(monitor)); } -g_object_unref(G_OBJECT(monitor)); - TRACE(exiting (%s), returning 0x%p, filename, mhandle); return mhandle; @@ -296,14 +304,12 @@ xfce_menu_init(XFCE); #endif -if(g_file_test(desktop_menu-filename, G_FILE_TEST_EXISTS)) { -desktop_menu-xfce_menu = xfce_menu_new(desktop_menu-filename, error); -if(!desktop_menu-xfce_menu) { -g_critical(Unable to create XfceMenu from file '%s': %s, - desktop_menu-filename, error-message); -g_error_free(error); -return FALSE; -} +desktop_menu-xfce_menu = xfce_menu_new(desktop_menu-filename, error); +if(!desktop_menu-xfce_menu) { +g_critical(Unable to create XfceMenu from file '%s': %s, + desktop_menu-filename, error-message); +g_error_free(error); +return FALSE; } return ret; @@ -312,8 +318,10 @@ static void _xfce_desktop_menu_free_menudata(XfceDesktopMenu *desktop_menu) { -if(desktop_menu-xfce_menu) +if(desktop_menu-xfce_menu) { g_object_unref(G_OBJECT(desktop_menu-xfce_menu)); +desktop_menu-xfce_menu = NULL; +} desktop_menu-xfce_menu = NULL; } @@ -336,7 +344,7 @@ { #ifdef HAVE_THUNAR_VFS static XfceMenuMonitorVTable monitor_vtable = { -NULL, //desktop_menu_xfce_menu_monitor_file, +NULL, /*desktop_menu_xfce_menu_monitor_file,*/ desktop_menu_xfce_menu_monitor_directory, desktop_menu_xfce_menu_remove_monitor }; ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits