parent
ee3acb220d
commit
9f8fe67d12
@ -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);
|
||||
}
|
Loading…
Reference in new issue