diff --git a/e2-0.1.8-06-08-09.patch b/e2-0.1.8-06-08-09.patch new file mode 100644 index 0000000..1e1f10c --- /dev/null +++ b/e2-0.1.8-06-08-09.patch @@ -0,0 +1,456 @@ +--- plugins/e2p_config.c 2006-06-23 01:03:45.000000000 -0400 ++++ plugins/e2p_config.c 2006-08-09 11:15:13.000000000 -0400 +@@ -526,5 +526,9 @@ + if (e2_option_bool_get ("confirm-overwrite")) + { ++#ifdef FILES_UTF8ONLY ++ gchar *dlocal = F_FILENAME_TO_LOCALE ((gchar *)savepath); ++#else + gchar *dlocal = F_FILENAME_TO_LOCALE (savepath); ++#endif + if (e2_fs_access2 (dlocal) == 0) + { +@@ -974,5 +978,9 @@ + else + openpath = ICON_DIR; ++#ifdef FILES_UTF8ONLY ++ gchar *local = F_FILENAME_TO_LOCALE ((gchar *)openpath); ++#else + gchar *local = F_FILENAME_TO_LOCALE (openpath); ++#endif + //default icons in config dir if it's usable + if (!e2_fs_is_dir3 (local) || e2_fs_access (local, R_OK | X_OK)) +--- plugins/e2p_rename_ext.c 2006-08-02 09:38:04.000000000 -0400 ++++ plugins/e2p_rename_ext.c 2006-08-05 23:03:49.000000000 -0400 +@@ -266,6 +266,7 @@ + * before this is called + * +- * @param oldtemplate search pattern string (utf8) possibly with 'extended' regex as appropriate ++ * @param oldtemplate search pattern string (utf8) possibly with 'extended' regex as appropriate, or NULL + * @param oldpath absolute path (utf8 string) of item to be changed ++ * @param rt pointer to dialog data struct + * + * @return replacement name, newly allocated utf8 string +@@ -591,8 +592,8 @@ + if (regcomp (&compiled, old, REG_EXTENDED)) + { ++ result = FALSE; + tmp2 = g_strdup_printf + (_("Error in regualar expression %s"), old); + e2_output_print_error (tmp2, TRUE); +- result = FALSE; + } + else +@@ -677,4 +678,41 @@ + g_ptr_array_free (data.candidates, FALSE); + ++ if (_e2pr_get_flag (NEW_THIS_P)) ++ { ++ //for OLD_SEL_P, tmp2 is set inside remame loop ++ if (_e2pr_get_flag (OLD_WILD_P)) //, rt)) ++ { //wildcard or specific names used ++ //adjust the find pattern, by replacing all '.', '*' and '?' ++ //in the pattern with their extended regex equivalents ++ gchar **split = g_strsplit (old, ".", -1); ++ tmp2 = g_strjoinv ("\\.", split); ++ g_strfreev (split); ++ split = g_strsplit (tmp2, "*", -1); ++ g_free (tmp2); ++ tmp2 = g_strjoinv ("(.*)", split); ++ g_strfreev (split); ++ split = g_strsplit (tmp2, "?", -1); ++ g_free (tmp2); ++ tmp2 = g_strjoinv ("(.)", split); //freeme later ++ g_strfreev (split); ++ // printd (DEBUG, "wildcard rename pattern is %s", pattern); ++ //get the chunks of the replacement pattern ++ _e2pr_parse_wildpattern (new, rt); ++ } ++ else if (_e2pr_get_flag (OLD_REGEX_P)) ++ { //regex names (actually, paths) used ++ //convert the name using the same regex as 'find' used ++ tmp2 = (gchar *)old; ++ //get the chunks of the replacement pattern ++ _e2pr_parse_regexpattern (new, rt); ++ } ++ else //(OLD_SEL_P) ++ //CHECKME we can't match a new pattern against selected ++ //item name, but \0 would be ok ? ++ _e2pr_parse_regexpattern (new, rt); ++ } ++ else //we are just changing case ++ tmp2 = NULL; //don't need an old or new pattern ++ + if (_e2pr_get_flag (NEW_LOWER_P)) //, rt)) + rt->modeflags |= E2PR_LOWER; +@@ -714,48 +752,10 @@ + gchar *base = g_path_get_basename (*thisone); + gchar *dir = g_path_get_dirname (*thisone); +- gchar *newbase; +- if (rt->modeflags & E2PR_SEL) +- { +- tmp2 = g_strdup (base); +- } +- else if (rt->modeflags & E2PR_SAME) +- { +- if (!rt->parsed) +- { //we haven't got the replacement chunks yet, get them now +- gchar **split; +- if (_e2pr_get_flag (OLD_WILD_P)) //, rt)) +- { //wildcard or specific names used +- //adjust the find pattern, by replacing all '.', '*' and '?' +- //in the pattern with their extended regex equivalents +- split = g_strsplit (old, ".", -1); +- tmp2 = g_strjoinv ("\\.", split); +- g_strfreev (split); +- split = g_strsplit (tmp2, "*", -1); +- g_free (tmp2); +- tmp2 = g_strjoinv ("(.*)", split); +- g_strfreev (split); +- split = g_strsplit (tmp2, "?", -1); +- g_free (tmp2); +- tmp2 = g_strjoinv ("(.)", split); +- g_strfreev (split); +- // printd (DEBUG, "wildcard rename pattern is %s", pattern); +- //get the chunks of the replacement pattern +- _e2pr_parse_wildpattern (new, rt); +- } +- else +- { //regex names (actually, paths) used +- tmp2 = g_strdup (old); +- //get the chunks of the replacement pattern +- _e2pr_parse_regexpattern (new, rt); +- //we will convert the name using the same regex as 'find' used +- } +- rt->parsed = TRUE; +- } +- } +- else //we are just changing case +- tmp2 = g_strdup (old); ++ //for other cases, tmp2 is set outside loop ++ if ((rt->modeflags & E2PR_SAME) && _e2pr_get_flag (OLD_SEL_P)) ++ tmp2 = base; + + //get the replacement basename +- newbase = _e2pr_name_replace (tmp2, *thisone, rt); ++ gchar *newbase = _e2pr_name_replace (tmp2, *thisone, rt); + + //ask, if the confirm option is is force, and the parent's stop btn not pressed +@@ -862,6 +862,7 @@ + + //cleanups +- g_strfreev (candidates); ++ if ((rt->modeflags & E2PR_SAME) && _e2pr_get_flag (OLD_WILD_P)) + g_free (tmp2); ++ g_strfreev (candidates); + gint j; + for (j=0;j 4) ? FALSE : TRUE; + e2_cl_options.ignore_problems = FALSE; ++#ifdef FILES_UTF8ONLY ++ e2_cl_options.trash_dir = g_build_filename (g_get_user_data_dir (), "Trash", "files", NULL); ++#else + freeme = e2_utf8_filename_from_locale (g_get_user_data_dir ()); + e2_cl_options.trash_dir = g_build_filename (freeme, "Trash", "files", NULL); + g_free (freeme); +- ++#endif + gint c, d = 0; + while (1) +@@ -158,5 +166,9 @@ + g_free (e2_cl_options.config_dir); + if (g_path_is_absolute (optarg)) ++#ifdef FILES_UTF8ONLY ++ convert = g_strdup (optarg); ++#else + convert = optarg; ++#endif + else + { +@@ -165,10 +177,14 @@ + g_free (freeme); + } ++#ifdef FILES_UTF8ONLY ++ e2_cl_options.config_dir = convert; ++#else + e2_cl_options.config_dir = e2_utf8_filename_from_locale (convert); + if (convert != optarg) + g_free (convert); ++#endif + printd (DEBUG, "setting config directory '%s'", e2_cl_options.config_dir); + break; +- #ifdef DEBUG_MESSAGES ++#ifdef DEBUG_MESSAGES + case 'd': + printd (DEBUG, "setting debug level '%s'", optarg); +@@ -185,5 +201,5 @@ + } + break; +- #endif ++#endif + case 'e': + g_free (e2_cl_options.encoding); +@@ -205,5 +221,9 @@ + g_free (e2_cl_options.trash_dir); + if (g_path_is_absolute (optarg)) ++#ifdef FILES_UTF8ONLY ++ convert = g_strdup (optarg); ++#else + convert = optarg; ++#endif + else + { +@@ -212,7 +232,11 @@ + g_free (freeme); + } ++#ifdef FILES_UTF8ONLY ++ e2_cl_options.trash_dir = convert; ++#else + e2_cl_options.trash_dir = e2_utf8_filename_from_locale (convert); + if (convert != optarg) + g_free (convert); ++#endif + printd (DEBUG, "setting trash directory '%s'", e2_cl_options.trash_dir); + break; +--- src/config/e2_option__default.c 2006-07-15 20:31:46.000000000 -0400 ++++ src/config/e2_option__default.c 2006-08-09 11:13:46.000000000 -0400 +@@ -239,5 +239,5 @@ + E2_OPTION_FLAG_BASIC | E2_OPTION_FLAG_BUILDLISTS); + +- e2_option_bool_register ("show-updir-entry", group_name, _("show parent directory entry '..' in each file list"), ++ e2_option_bool_register ("show-updir-entry", group_name, _("show parent directory entry '..' in file lists"), + _("This slows status-line updates"), NULL, FALSE, + E2_OPTION_FLAG_BASIC | E2_OPTION_FLAG_BUILDLISTS); +--- src/config/e2_option_tree.c 2006-07-22 18:53:08.000000000 -0400 ++++ src/config/e2_option_tree.c 2006-08-07 17:33:42.000000000 -0400 +@@ -160,4 +160,6 @@ + //clean up + gtk_tree_path_free (path); ++ //revert focus to edited row ++ gtk_widget_grab_focus (set->widget); + } + +--- src/dialogs/e2_edit_dialog.c 2006-07-30 22:00:36.000000000 -0400 ++++ src/dialogs/e2_edit_dialog.c 2006-08-08 02:02:26.000000000 -0400 +@@ -355,6 +355,13 @@ + E2_ViewDialogRuntime *rt) + { ++ if (!gtk_text_buffer_get_modified (GTK_TEXT_BUFFER (rt->textbuffer))) ++ return; //no point in reloading ++ DialogButtons choice = e2_dialog_warning ( ++ _("Reverting to saved version cannot be undone")); ++ if (choice == OK) ++ { + e2_view_dialog_read_text (rt); //probably won't fail when refreshing + gtk_text_buffer_set_modified (rt->textbuffer, FALSE); ++ } + gtk_widget_grab_focus (rt->textview); + } +@@ -615,5 +622,5 @@ + e2_menu_add_action (menu, _("Se_ttings"), GTK_STOCK_PREFERENCES, + _("Open the configuration dialog at the options page"), +- item_name, _C(40), //_("view") ++ item_name, _C(9), //_("dialogs") + NULL); + g_free(item_name); +@@ -1046,5 +1053,5 @@ + { //edit output pane buffer + const gchar *home = g_get_home_dir (); +- gchar *utf = F_FILENAME_FROM_LOCALE (home); ++ gchar *utf = F_FILENAME_FROM_LOCALE ((gchar *)home); + gchar *name = g_strconcat (_C(27), "-", _A(39), NULL); //_("output-edit") + rt->filepath = g_build_filename (utf, name, NULL); +@@ -1082,4 +1089,6 @@ + // gtk_label_set_line_wrap (GTK_LABEL (label), FALSE); + gtk_label_set_selectable (GTK_LABEL (label), TRUE); ++ ++ e2_widget_add_separator (GTK_DIALOG (rt->dialog)->vbox, FALSE, 0); + //create the view + GtkWidget *sw = e2_widget_add_sw (GTK_DIALOG (rt->dialog)->vbox, +@@ -1100,10 +1109,13 @@ + rt->history = e2_list_copy_with_data (find_history); //CHECKME why copy these ? + rt->rephistory = e2_list_copy_with_data (replace_history); +- //action area is a GtkHButtonBox, things can't be stacked +- //vertically there +- //so we put the search panel at the bottom of the dialog's vbox +- rt->panel = e2_widget_add_box (GTK_DIALOG (rt->dialog)->vbox, +- FALSE, 0, TRUE, FALSE, 0); +- gtk_widget_hide (rt->panel); ++ ++ //action_area is a GtkHButtonBox packed at the end of the dialog's vbox ++ //ditto for dialog->separator ++ //locate find-bar between those 2 ++ rt->panel = e2_widget_get_box (TRUE, FALSE, 0); ++ gtk_box_pack_end (GTK_BOX (GTK_DIALOG (rt->dialog)->vbox), rt->panel, ++ FALSE, TRUE, E2_PADDING_XSMALL); ++ gtk_box_reorder_child (GTK_BOX (GTK_DIALOG (rt->dialog)->vbox), rt->panel, 1); ++ + //add handlebox + GtkWidget *hndlbox = gtk_handle_box_new (); +--- src/dialogs/e2_permissions_dialog.c 2006-07-22 19:19:20.000000000 -0400 ++++ src/dialogs/e2_permissions_dialog.c 2006-08-08 00:49:11.000000000 -0400 +@@ -374,4 +374,12 @@ + statbuf.st_mode & S_ISVTX, &rt); + ++ if (!rt.permission || !thisis_dir) ++ { ++ //prevent testing of missing widgets in the response cb ++ rt.recurse_button = NULL; ++ rt.recurse_dirs_button = NULL; ++ rt.recurse_other_button = NULL; ++ } ++ + if (rt.permission) + { +@@ -421,12 +429,7 @@ + } + else //no right to change object permissions +- { +- //prevent testing of missing widgets in the response cb +- rt.recurse_button = NULL; +- rt.recurse_dirs_button = NULL; +- rt.recurse_other_button = NULL; + //show message + e2_ownership_dialog_warn (dialog_vbox); +- } ++ + g_string_free (label_text, TRUE); + +--- src/dialogs/e2_view_dialog.c 2006-07-31 01:39:58.000000000 -0400 ++++ src/dialogs/e2_view_dialog.c 2006-08-07 17:33:42.000000000 -0400 +@@ -442,6 +442,6 @@ + item_name = g_strconcat (_A(2),".",_A(32),NULL); + e2_menu_add_action (menu, _("_Settings"), GTK_STOCK_PREFERENCES, +- _("Open the configuration dialog at the view options page"), +- item_name, _C(40), //_("view") ++ _("Open the configuration dialog at the options page"), ++ item_name, _C(9), //_("dialogs") + NULL); + g_free(item_name); +@@ -907,4 +907,6 @@ + gtk_window_set_type_hint (GTK_WINDOW (rt->dialog), + GDK_WINDOW_TYPE_HINT_NORMAL); ++ ++ e2_widget_add_separator (GTK_DIALOG (rt->dialog)->vbox, FALSE, 0); + //create the view + GtkWidget *sw = e2_widget_add_sw (GTK_DIALOG (rt->dialog)->vbox, +@@ -927,10 +929,12 @@ + rt->history = e2_list_copy_with_data (find_history); + +- //action area is a GtkHButtonBox, things can't be stacked +- //vertically there +- //so we put the search panel at the bottom of the dialog's vbox +- rt->panel = e2_widget_add_box (GTK_DIALOG (rt->dialog)->vbox, +- FALSE, 0, TRUE, FALSE, 0); +- gtk_widget_hide (rt->panel); ++ //action area is a GtkHButtonBox packed at the end of the dialog's vbox ++ //ditto for dialog->separator ++ //locate find-bar between those 2 ++ rt->panel = e2_widget_get_box (TRUE, FALSE, 0); ++ gtk_box_pack_end (GTK_BOX (GTK_DIALOG (rt->dialog)->vbox), rt->panel, ++ FALSE, TRUE, E2_PADDING_XSMALL); ++ gtk_box_reorder_child (GTK_BOX (GTK_DIALOG (rt->dialog)->vbox), rt->panel, 1); ++ + //add handlebox + GtkWidget *hndlbox = gtk_handle_box_new (); +--- src/e2_context_menu.c 2006-07-17 06:49:08.000000000 -0400 ++++ src/e2_context_menu.c 2006-08-07 17:34:35.000000000 -0400 +@@ -512,5 +512,5 @@ + g_strconcat("\t",_("_Edit plugins.."),"|gtk-preferences|false|false|",_A(2),".",_C(33),"|",NULL), + g_strconcat(_("_User commands"),"|user_commands_"E2IP".png|false|false|",_A(18),"|",NULL), +- g_strconcat("\t",_("_Make new file.."),"|gtk-new|false|true|touch|%{",_("Enter file name:"),"}",NULL), //_A(16) ++ g_strconcat("\t",_("_Make new file.."),"|gtk-new|false|true|touch|'%{",_("Enter file name:"),"}'",NULL), //_A(16) + g_strconcat("\t",_("_Compare files"),"||false|true|>cmp|-s %f %F && echo \"",_("The files are identical"),"\"\\n \\|\\| echo \"",_("The files are different"),"\"\\n",NULL), //_A(16) + g_strconcat("\t",_("Compare _directories"),"||false|true|diff|%d %D",NULL), //_A(16) +@@ -518,5 +518,5 @@ + g_strconcat("\t",_("_Remove spaces"),"||false|true|>mv|%f `echo %f \\| sed -e 's/ //g'` 2>/dev/null &",NULL), //_A(16) + g_strconcat("\t",_("_Split file.."),"||false|true|split|-b %{",_("Enter the piece-size (in kB):"),"}k %f %f_",NULL), //_A(16) +- g_strconcat("\t",_("Co_ncatenate files.."),"||false|true|cat|%f > %{",_("Enter the name of the combined file:"),"}",NULL), //_A(16) ++ g_strconcat("\t",_("Co_ncatenate files.."),"||false|true|cat|%f > '%{",_("Enter the name of the combined file:"),"}'",NULL), //_A(16) + g_strconcat("\t",_("_Free space"),"||false|true|>stat|-f %d \\| awk '/Blocks/ {printf \"%2.1f ", _("percent free"),"\",$5/$3*100}'",NULL), //_A(16) + g_strconcat("\t||false|true|",_A(17),"|",NULL), +--- src/e2_fileview.c 2006-08-05 06:34:20.000000000 -0400 ++++ src/e2_fileview.c 2006-08-09 11:30:27.000000000 -0400 +@@ -1670,5 +1670,5 @@ + /** + * @brief update filters for treeview +- * This changes model, and attaches view to new model, as appropriate ++ * This changes model, and attaches view to new model + * Assumes view attached to a model (store ?) + * When new store is created, view->filtered_before will be false +@@ -1732,4 +1732,7 @@ + gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (view->model)); + } ++ else //still unfiltered, make sure the filtermodel is applied ++ gtk_tree_view_set_model (GTK_TREE_VIEW (view->treeview), view->model); ++ + view->filtered_before = filtered_now; + } +@@ -2634,5 +2637,9 @@ + GtkTreeSortable *sortable; + GList *entries; ++#ifdef E2_NEWREFRESH ++ if (view->refreshtype == E2_CHANGE) ++#else + if (view->refreshtype == E2_REFRESH || view->refreshtype == E2_CHANGE) ++#endif + { + //construct relevant items data for store-filler +@@ -2649,4 +2656,5 @@ + } + // printd (DEBUG, "current directory data loaded"); ++#ifndef E2_NEWREFRESH + #if defined (E2_FAM_INOTIFY) || defined (E2_FAM_DNOTIFY) || defined (E2_FAM_KQUEUE) + if (view->refreshtype == E2_REFRESH) +@@ -2659,4 +2667,5 @@ + change after an item is processed in this refresh */ + #endif //which fam ++#endif //ndef E2_NEWREFRESH + mdl = GTK_TREE_MODEL (view->store); + sortable = GTK_TREE_SORTABLE (mdl); +@@ -2673,5 +2682,4 @@ + //make sure the store stays alive after the treeview unrefs the model + g_object_ref (G_OBJECT (view->store)); +-#endif + /* for speed, and no-blanking in the case of repeated + refreshes, detach model from view +@@ -2679,4 +2687,5 @@ + store-clear that we do this */ + gtk_tree_view_set_model (GTK_TREE_VIEW (view->treeview), NULL); ++#endif + } + else //doing a window recreation +@@ -3310,5 +3319,7 @@ + ACCESSED, access, + CHANGED, change, ++ FORECOLOR, foreground, //maybe changed executable status + -1); ++ //copy this so original can be cleared + currinfoptr->statbuf = newinfoptr->statbuf; + } +--- src/e2_output.c 2006-07-25 19:48:56.000000000 -0400 ++++ src/e2_output.c 2006-08-05 22:57:42.000000000 -0400 +@@ -304,6 +304,6 @@ + g_free (action); + g_free (path); +- ext = (gchar *)0x2; //prevent further handling + } ++ ext = (gchar *)0x2; //prevent further handling + } + else diff --git a/emelfm2.spec b/emelfm2.spec index 8a1a78f..2a35869 100644 --- a/emelfm2.spec +++ b/emelfm2.spec @@ -1,6 +1,6 @@ Name: emelfm2 Version: 0.1.8 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A file manager that implements the popular two-pane design Group: Applications/File @@ -8,6 +8,7 @@ License: GPL URL: http://emelfm2.net/ Source0: http://emelfm2.net/rel/emelfm2-%{version}.tar.gz Patch0: emelfm2-makefile.config.patch +Patch1: e2-0.1.8-06-08-09.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gtk2-devel >= 2.6.0, gettext, desktop-file-utils @@ -21,6 +22,7 @@ opening an xterm. %prep %setup -q +%patch1 -p0 -b .06-08-09 %patch0 -p0 -b .orig sed -i 's!%PREFIX%'!'%{_prefix}!' Makefile.config # fix for x86_64 libs @@ -65,6 +67,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Aug 11 2006 Christoph Wickert - 0.1.8-2 +- Include upstream's e2-0.1.8-06-08-09.patch to fix two serious bugs. + * Sun Aug 06 2006 Christoph Wickert - 0.1.8-1 - Update to 0.1.8.