Mamoru TASAKA 10 years ago
parent ee3acb220d
commit 9f8fe67d12

1
.gitignore vendored

@ -18,3 +18,4 @@ gnome-commander-1.2.8.7.tar.bz2
/gnome-commander-1.4.5.tar.xz /gnome-commander-1.4.5.tar.xz
/gnome-commander-5a4806f7e5789a7d29d62550e9128436ffdef00a.tar.xz /gnome-commander-5a4806f7e5789a7d29d62550e9128436ffdef00a.tar.xz
/gnome-commander-1.4.6.tar.xz /gnome-commander-1.4.6.tar.xz
/gnome-commander-1.4.7.tar.xz

@ -1,29 +0,0 @@
commit 5b0b3a469ab426feb596b0edfcc61cde4c0e6e80
Author: Uwe Scholz <uwescholz@src.gnome.org>
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)

@ -1,25 +0,0 @@
From a7239bd930cc840b59cbe2b1fed0a49301a78473 Mon Sep 17 00:00:00 2001
From: Uwe Scholz <uwescholz@src.gnome.org>
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

@ -1,85 +0,0 @@
From e47883cd16c914158b9d20da67b7b06d8c7265a7 Mon Sep 17 00:00:00 2001
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
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

@ -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

@ -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);
}

@ -28,7 +28,7 @@
%global use_autotool 0 %global use_autotool 0
%global update_po 0 %global update_po 0
%global if_pre 0 %global if_pre 0
%global main_release 3 %global main_release 1
#%%global extratag %{git_pull_JST}git%{shorthash} #%%global extratag %{git_pull_JST}git%{shorthash}
%undefine extratag %undefine extratag
%global mimeedit_rev 1958 %global mimeedit_rev 1958
@ -50,7 +50,7 @@
%global fedora_rel %( [ 0%{?if_pre} -gt 0 ] && echo 0. )%{main_release}%{?extratag:.%extratag} %global fedora_rel %( [ 0%{?if_pre} -gt 0 ] && echo 0. )%{main_release}%{?extratag:.%extratag}
Name: gnome-commander Name: gnome-commander
Version: 1.4.6 Version: 1.4.7
# Downgrade 3 times, sorry... # Downgrade 3 times, sorry...
Epoch: 4 Epoch: 4
Release: %{fedora_rel}%{?dist} 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 #Source0: https://git.gnome.org/browse/gnome-commander/snapshot/%{name}-%{githash}.tar.xz
Source1: gnome-commander.sh Source1: gnome-commander.sh
Source10: mimeedit-svn%{mimeedit_rev}.sh Source10: mimeedit-svn%{mimeedit_rev}.sh
Patch10: mimeedit-svn1958.diff Patch1: gnome-commander-1.4.7-path-fedora-specific.patch
# 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
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: desktop-file-utils 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}-%{version}%{?extratag:-%extratag}
#%%setup -q -n %{name}-%{githash} #%%setup -q -n %{name}-%{githash}
%patch1 -p1 -b .path
%if 0%{use_autotool} > 0 %if 0%{use_autotool} > 0
( export NOCONFIGURE=1 ; sh autogen.sh ) ( export NOCONFIGURE=1 ; sh autogen.sh )
%endif %endif
#%{__cp} -p %SOURCE10 mimeedit.sh
#%%patch10 -p0
%patch100 -p1
%patch101 -p1
%patch102 -p1
%patch103 -p1
%{__sed} -i.pylib \ %{__sed} -i.pylib \
-e 's|\$PY_EXEC_PREFIX/lib|%{_libdir}|' \ -e 's|\$PY_EXEC_PREFIX/lib|%{_libdir}|' \
configure configure
@ -163,7 +149,13 @@ ansluta till FTP-servrar och SMB-nätverk.
# gzip # gzip
gzip -9 ChangeLog-* gzip -9 ChangeLog-*
mkdir TMPBINDIR
cd TMPBINDIR
ln -sf /bin/true ./update-mime-database
%build %build
export PATH=$(pwd)/TMPBINDIR:$PATH
# Install wrapper script, and move binaries to # Install wrapper script, and move binaries to
# %%{_libexecdir}/%%{name} # %%{_libexecdir}/%%{name}
mkdir _builddir || : mkdir _builddir || :
@ -207,6 +199,8 @@ popd # from _builddir
%install %install
%{__rm} -rf %{buildroot} %{__rm} -rf %{buildroot}
export PATH=$(pwd)/TMPBINDIR:$PATH
pushd _builddir pushd _builddir
%{__make} \ %{__make} \
INSTALL="%{__install} -c -p" \ INSTALL="%{__install} -c -p" \
@ -240,6 +234,21 @@ desktop-file-install \
%clean %clean
%{__rm} -rf %{buildroot} %{__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 %files -f %{name}.lang
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc AUTHORS %doc AUTHORS
@ -263,10 +272,16 @@ desktop-file-install \
%{_datadir}/gnome/help/%{name}/ %{_datadir}/gnome/help/%{name}/
%{_datadir}/omf/%{name}/ %{_datadir}/omf/%{name}/
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/mime
%{_datadir}/pixmaps/%{name}.png %{_datadir}/pixmaps/%{name}.png
%{_datadir}/pixmaps/%{name}/ %{_datadir}/pixmaps/%{name}/
%changelog %changelog
* Sun May 31 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 4:1.4.7-1
- 1.4.7
* Thu May 28 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 4:1.4.6-3 * Thu May 28 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 4:1.4.6-3
- Select one entry when pattern matched (bgo#749869) - Select one entry when pattern matched (bgo#749869)

@ -1 +1 @@
9029f0c0c423ff40b82b6e13ad8e95aa gnome-commander-1.4.6.tar.xz 347337051c10745158200762ae29fa22 gnome-commander-1.4.7.tar.xz

Loading…
Cancel
Save