diff --git a/.gitignore b/.gitignore index 7cc831a..fc39544 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ gnome-commander-1.2.8.7.tar.bz2 /gnome-commander-1.4.5.tar.xz /gnome-commander-5a4806f7e5789a7d29d62550e9128436ffdef00a.tar.xz /gnome-commander-1.4.6.tar.xz +/gnome-commander-1.4.7.tar.xz diff --git a/gnome-commander-1.4.6-add_sec_check_for_mime_exec_file.patch b/gnome-commander-1.4.6-add_sec_check_for_mime_exec_file.patch deleted file mode 100644 index 1642ee7..0000000 --- a/gnome-commander-1.4.6-add_sec_check_for_mime_exec_file.patch +++ /dev/null @@ -1,29 +0,0 @@ -commit 5b0b3a469ab426feb596b0edfcc61cde4c0e6e80 -Author: Uwe Scholz -Date: Sat Mar 7 00:26:04 2015 +0100 - - Added security check for mime_exec_file - -diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc -index 0312a85..d46ed16 100644 ---- a/src/gnome-cmd-file-list.cc -+++ b/src/gnome-cmd-file-list.cc -@@ -1172,14 +1172,15 @@ static gboolean on_button_press (GtkCList *clist, GdkEventButton *event, GnomeCm - - inline gboolean mime_exec_file (GnomeCmdFile *f) - { -+ g_return_val_if_fail (f != NULL, FALSE); -+ - if (f->info->type == GNOME_VFS_FILE_TYPE_REGULAR) - { - mime_exec_single (f); -- return TRUE; - } - -- return FALSE; --} -+ return TRUE; -+ } - - - static void on_file_clicked (GnomeCmdFileList *fl, GnomeCmdFile *f, GdkEventButton *event, gpointer data) diff --git a/gnome-commander-1.4.6-fix-ret-value-on-patch100.patch b/gnome-commander-1.4.6-fix-ret-value-on-patch100.patch deleted file mode 100644 index 2c7b63d..0000000 --- a/gnome-commander-1.4.6-fix-ret-value-on-patch100.patch +++ /dev/null @@ -1,25 +0,0 @@ -From a7239bd930cc840b59cbe2b1fed0a49301a78473 Mon Sep 17 00:00:00 2001 -From: Uwe Scholz -Date: Sat, 23 May 2015 21:43:52 +0200 -Subject: Only return true if mime_exec_single() is executed - - -diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc -index d46ed16..8f689a2 100644 ---- a/src/gnome-cmd-file-list.cc -+++ b/src/gnome-cmd-file-list.cc -@@ -1177,9 +1177,10 @@ inline gboolean mime_exec_file (GnomeCmdFile *f) - if (f->info->type == GNOME_VFS_FILE_TYPE_REGULAR) - { - mime_exec_single (f); -+ return TRUE; - } -+ return FALSE; - -- return TRUE; - } - - --- -cgit v0.10.2 - diff --git a/gnome-commander-1.4.6-set-focus-on-searchdialog.patch b/gnome-commander-1.4.6-set-focus-on-searchdialog.patch deleted file mode 100644 index 0d37abe..0000000 --- a/gnome-commander-1.4.6-set-focus-on-searchdialog.patch +++ /dev/null @@ -1,85 +0,0 @@ -From e47883cd16c914158b9d20da67b7b06d8c7265a7 Mon Sep 17 00:00:00 2001 -From: Mamoru TASAKA -Date: Thu, 21 May 2015 14:32:56 +0900 -Subject: set focus when showing search dialog - -https://bugzilla.gnome.org/show_bug.cgi?id=745454 - -To avoid GnomeCmdSearchDialog priv->result_list receive -"key-press-event", explicitly set focus on pattern_combo -when search dialog is raised. - -diff --git a/src/dialogs/gnome-cmd-search-dialog.cc b/src/dialogs/gnome-cmd-search-dialog.cc -index 3c8407e..e2125a1 100644 ---- a/src/dialogs/gnome-cmd-search-dialog.cc -+++ b/src/dialogs/gnome-cmd-search-dialog.cc -@@ -1116,6 +1116,12 @@ static void gnome_cmd_search_dialog_class_init (GnomeCmdSearchDialogClass *klass - } - - -+void GnomeCmdSearchDialog::show_and_set_focus() -+{ -+ gtk_widget_show(*this); -+ priv->profile_component->set_focus(); -+} -+ - GnomeCmdSearchDialog::GnomeCmdSearchDialog(GnomeCmdData::SearchConfig &cfg): defaults(cfg) - { - gtk_window_set_default_size (*this, defaults.width, defaults.height); -diff --git a/src/dialogs/gnome-cmd-search-dialog.h b/src/dialogs/gnome-cmd-search-dialog.h -index f5b950c..84bc2bf 100644 ---- a/src/dialogs/gnome-cmd-search-dialog.h -+++ b/src/dialogs/gnome-cmd-search-dialog.h -@@ -55,6 +55,8 @@ struct GnomeCmdSearchDialog - - GnomeCmdData::SearchConfig &defaults; - -+ void show_and_set_focus(); -+ - GnomeCmdSearchDialog(GnomeCmdData::SearchConfig &defaults); - ~GnomeCmdSearchDialog(); - }; -diff --git a/src/gnome-cmd-selection-profile-component.cc b/src/gnome-cmd-selection-profile-component.cc -index 96d4a18..d56e450 100644 ---- a/src/gnome-cmd-selection-profile-component.cc -+++ b/src/gnome-cmd-selection-profile-component.cc -@@ -237,6 +237,11 @@ void GnomeCmdSelectionProfileComponent::copy(GnomeCmdData::Selection &profile) - profile.match_case = profile.content_search && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->case_check)); - } - -+void GnomeCmdSelectionProfileComponent::set_focus() -+{ -+ gtk_widget_grab_focus (priv->pattern_combo); -+} -+ - - void GnomeCmdSelectionProfileComponent::set_name_patterns_history(GList *history) - { -diff --git a/src/gnome-cmd-selection-profile-component.h b/src/gnome-cmd-selection-profile-component.h -index 1620703..95924c0 100644 ---- a/src/gnome-cmd-selection-profile-component.h -+++ b/src/gnome-cmd-selection-profile-component.h -@@ -55,6 +55,7 @@ struct GnomeCmdSelectionProfileComponent - void update(); - void copy(); // copies component to associated profile - void copy(GnomeCmdData::Selection &profile); // copies component to specified profile -+ void set_focus(); - - void set_name_patterns_history(GList *history); - void set_content_patterns_history(GList *history); -diff --git a/src/gnome-cmd-user-actions.cc b/src/gnome-cmd-user-actions.cc -index b0bee29..f65ce53 100644 ---- a/src/gnome-cmd-user-actions.cc -+++ b/src/gnome-cmd-user-actions.cc -@@ -1023,7 +1023,7 @@ void edit_search (GtkMenuItem *menuitem, gpointer not_used) - if (!main_win->file_search_dlg) - main_win->file_search_dlg = new GnomeCmdSearchDialog(gnome_cmd_data.search_defaults); - -- gtk_widget_show (*main_win->file_search_dlg); -+ main_win->file_search_dlg->show_and_set_focus(); - } - - --- -cgit v0.10.2 - diff --git a/gnome-commander-1.4.6-set-focus-when-found.patch b/gnome-commander-1.4.6-set-focus-when-found.patch deleted file mode 100644 index 638abbd..0000000 --- a/gnome-commander-1.4.6-set-focus-when-found.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- gnome-commander-1.4.6/src/dialogs/gnome-cmd-search-dialog.cc.debug 2015-05-26 09:59:43.955984728 +0900 -+++ gnome-commander-1.4.6/src/dialogs/gnome-cmd-search-dialog.cc 2015-05-26 10:30:48.683253817 +0900 -@@ -534,8 +534,14 @@ - gtk_dialog_set_response_sensitive (*data->dialog, GnomeCmdSearchDialog::GCMD_RESPONSE_FIND, TRUE); - gtk_dialog_set_default_response (*data->dialog, GnomeCmdSearchDialog::GCMD_RESPONSE_FIND); - -- if (matches) -- gtk_widget_grab_focus (*data->dialog->priv->result_list); // set focus to result list -+ if (matches) { -+ GnomeCmdFileList *fl = data->dialog->priv->result_list; -+ gtk_widget_grab_focus (*fl); // set focus to result list -+ // select one file, as matches is non-zero, there should be at least one entry -+ if (!fl->get_focused_file()) { -+ fl->select_row(0); -+ } -+ } - } - - return FALSE; // returning FALSE here stops the timeout callbacks diff --git a/gnome-commander-1.4.7-path-fedora-specific.patch b/gnome-commander-1.4.7-path-fedora-specific.patch new file mode 100644 index 0000000..184910a --- /dev/null +++ b/gnome-commander-1.4.7-path-fedora-specific.patch @@ -0,0 +1,11 @@ +--- gnome-commander-1.4.7/src/utils.cc.path 2015-05-31 00:17:24.000000000 +0900 ++++ gnome-commander-1.4.7/src/utils.cc 2015-05-31 12:10:44.150102257 +0900 +@@ -113,7 +113,7 @@ + + if (gnome_cmd_data.use_gcmd_block) + { +- gchar *s = g_strdup_printf ("%s; %s/bin/gcmd-block", in_command, PREFIX); ++ gchar *s = g_strdup_printf ("%s; /usr/libexec/%s/gcmd-block", in_command, PACKAGE); + arg = g_shell_quote (s); + g_free (s); + } diff --git a/gnome-commander.spec b/gnome-commander.spec index b42450b..663b438 100644 --- a/gnome-commander.spec +++ b/gnome-commander.spec @@ -28,7 +28,7 @@ %global use_autotool 0 %global update_po 0 %global if_pre 0 -%global main_release 3 +%global main_release 1 #%%global extratag %{git_pull_JST}git%{shorthash} %undefine extratag %global mimeedit_rev 1958 @@ -50,7 +50,7 @@ %global fedora_rel %( [ 0%{?if_pre} -gt 0 ] && echo 0. )%{main_release}%{?extratag:.%extratag} Name: gnome-commander -Version: 1.4.6 +Version: 1.4.7 # Downgrade 3 times, sorry... Epoch: 4 Release: %{fedora_rel}%{?dist} @@ -65,16 +65,7 @@ Source0: ftp://ftp.gnome.org/pub/GNOME/sources/%{name}/1.4/%{name}-%{versi #Source0: https://git.gnome.org/browse/gnome-commander/snapshot/%{name}-%{githash}.tar.xz Source1: gnome-commander.sh Source10: mimeedit-svn%{mimeedit_rev}.sh -Patch10: mimeedit-svn1958.diff -# backport 5b0b3a469ab426feb596b0edfcc61cde4c0e6e80 -Patch100: gnome-commander-1.4.6-add_sec_check_for_mime_exec_file.patch -# backport e47883cd16c914158b9d20da67b7b06d8c7265a7 -Patch101: gnome-commander-1.4.6-set-focus-on-searchdialog.patch -# backport a7239bd930cc840b59cbe2b1fed0a49301a78473 -Patch102: gnome-commander-1.4.6-fix-ret-value-on-patch100.patch -# https://bugzilla.gnome.org/show_bug.cgi?id=749869 -# Approved, 3327d9e4467317206e64bcbec9a2f8bac7ae4e6d -Patch103: gnome-commander-1.4.6-set-focus-when-found.patch +Patch1: gnome-commander-1.4.7-path-fedora-specific.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -145,17 +136,12 @@ ansluta till FTP-servrar och SMB-nätverk. %setup -q -n %{name}-%{version}%{?extratag:-%extratag} #%%setup -q -n %{name}-%{githash} +%patch1 -p1 -b .path + %if 0%{use_autotool} > 0 ( export NOCONFIGURE=1 ; sh autogen.sh ) %endif -#%{__cp} -p %SOURCE10 mimeedit.sh -#%%patch10 -p0 -%patch100 -p1 -%patch101 -p1 -%patch102 -p1 -%patch103 -p1 - %{__sed} -i.pylib \ -e 's|\$PY_EXEC_PREFIX/lib|%{_libdir}|' \ configure @@ -163,7 +149,13 @@ ansluta till FTP-servrar och SMB-nätverk. # gzip gzip -9 ChangeLog-* +mkdir TMPBINDIR +cd TMPBINDIR +ln -sf /bin/true ./update-mime-database + %build +export PATH=$(pwd)/TMPBINDIR:$PATH + # Install wrapper script, and move binaries to # %%{_libexecdir}/%%{name} mkdir _builddir || : @@ -207,6 +199,8 @@ popd # from _builddir %install %{__rm} -rf %{buildroot} +export PATH=$(pwd)/TMPBINDIR:$PATH + pushd _builddir %{__make} \ INSTALL="%{__install} -c -p" \ @@ -240,6 +234,21 @@ desktop-file-install \ %clean %{__rm} -rf %{buildroot} +%post +touch --no-create %{_datadir}/%{name}/mime/packages &> /dev/null +exit 0 + +%postun +[ $1 -eq 0 ] || exit 0 +touch --no-create %{_datadir}/%{name}/mime/packages &> /dev/null +update-mime-database %{?fedora:-n} %{_datadir}/%{name}/mime &> /dev/null +exit 0 + +%posttrans +update-mime-database %{?fedora:-n} %{_datadir}/%{name}/mime &> /dev/null +exit 0 + + %files -f %{name}.lang %defattr(-,root,root,-) %doc AUTHORS @@ -263,10 +272,16 @@ desktop-file-install \ %{_datadir}/gnome/help/%{name}/ %{_datadir}/omf/%{name}/ +%dir %{_datadir}/%{name} +%{_datadir}/%{name}/mime + %{_datadir}/pixmaps/%{name}.png %{_datadir}/pixmaps/%{name}/ %changelog +* Sun May 31 2015 Mamoru TASAKA - 4:1.4.7-1 +- 1.4.7 + * Thu May 28 2015 Mamoru TASAKA - 4:1.4.6-3 - Select one entry when pattern matched (bgo#749869) diff --git a/sources b/sources index 7b23379..90c5d84 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9029f0c0c423ff40b82b6e13ad8e95aa gnome-commander-1.4.6.tar.xz +347337051c10745158200762ae29fa22 gnome-commander-1.4.7.tar.xz