summarylogtreecommitdiffstats
path: root/uca_num_files.patch
diff options
context:
space:
mode:
authorConnor Behan2021-10-16 23:14:27 -0400
committerConnor Behan2021-10-16 23:14:27 -0400
commit983cd6281660c4be4c3f6c36650504cb95548c14 (patch)
treeeef9c09f46756190df88ce0f22d1c08a8bc3c8cf /uca_num_files.patch
parented72a289fb7220b07f0e70137a7417e61c199547 (diff)
downloadaur-983cd6281660c4be4c3f6c36650504cb95548c14.tar.gz
Update to 4.16.10-1
Diffstat (limited to 'uca_num_files.patch')
-rw-r--r--uca_num_files.patch432
1 files changed, 252 insertions, 180 deletions
diff --git a/uca_num_files.patch b/uca_num_files.patch
index 21497fbed6b4..362591c53c81 100644
--- a/uca_num_files.patch
+++ b/uca_num_files.patch
@@ -1,107 +1,57 @@
-diff -ru Thunar-1.6.15.orig/plugins/thunar-uca/thunar-uca-editor.c Thunar-1.6.15/plugins/thunar-uca/thunar-uca-editor.c
---- Thunar-1.6.15.orig/plugins/thunar-uca/thunar-uca-editor.c 2018-04-27 18:34:10.000000000 -0400
-+++ Thunar-1.6.15/plugins/thunar-uca/thunar-uca-editor.c 2018-04-27 18:34:19.000000000 -0400
-@@ -63,6 +63,8 @@
+diff -rudp thunar-4.16.10.orig/plugins/thunar-uca/thunar-uca-editor.c thunar-4.16.10/plugins/thunar-uca/thunar-uca-editor.c
+--- thunar-4.16.10.orig/plugins/thunar-uca/thunar-uca-editor.c 2021-10-16 13:53:35.000000000 -0400
++++ thunar-4.16.10/plugins/thunar-uca/thunar-uca-editor.c 2021-10-16 16:52:44.000000000 -0400
+@@ -69,12 +69,16 @@ struct _ThunarUcaEditor
+ GtkWidget *shortcut_button;
GtkWidget *sn_button;
- GtkWidget *parameter_entry;
GtkWidget *patterns_entry;
+ GtkWidget *upper_button;
+ GtkWidget *lower_button;
GtkWidget *directories_button;
GtkWidget *audio_files_button;
GtkWidget *image_files_button;
-@@ -102,6 +104,8 @@
- GtkWidget *table;
- GtkWidget *hbox;
- GtkWidget *vbox;
-+ GtkWidget *spin;
-+ GtkAdjustment *adj;
+ GtkWidget *text_files_button;
+ GtkWidget *video_files_button;
+ GtkWidget *other_files_button;
++ GtkAdjustment *upper_adjustment;
++ GtkAdjustment *lower_adjustment;
- /* configure the dialog properties */
- gtk_dialog_add_button (GTK_DIALOG (uca_editor), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
-@@ -381,6 +385,25 @@
- gtk_label_set_mnemonic_widget (GTK_LABEL (label), uca_editor->patterns_entry);
- gtk_widget_show (uca_editor->patterns_entry);
-
-+ /* widgets for setting the upper and lower bounds */
-+ label = gtk_label_new ("Minimum number of files:");
-+ gtk_widget_show (label);
-+ gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
-+ adj = (GtkAdjustment *) gtk_adjustment_new (-1.0, -1.0, 9999.0, 1.0, 1.0, 0.0);
-+ spin = gtk_spin_button_new (adj, 1.0, 0);
-+ gtk_widget_show (spin);
-+ gtk_table_attach (GTK_TABLE (table), spin, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
-+ uca_editor->lower_button = spin;
-+
-+ label = gtk_label_new ("Maximum number of files:");
-+ gtk_widget_show (label);
-+ gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
-+ adj = (GtkAdjustment *) gtk_adjustment_new (-1.0, -1.0, 9999.0, 1.0, 1.0, 0.0);
-+ spin = gtk_spin_button_new (adj, 1.0, 0);
-+ gtk_widget_show (spin);
-+ gtk_table_attach (GTK_TABLE (table), spin, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
-+ uca_editor->upper_button = spin;
-+
- /* set Atk label relation for the entry */
- object = gtk_widget_get_accessible (uca_editor->patterns_entry);
- relations = atk_object_ref_relation_set (gtk_widget_get_accessible (label));
-@@ -389,15 +412,15 @@
- g_object_unref (G_OBJECT (relation));
-
- align = g_object_new (GTK_TYPE_ALIGNMENT, "height-request", 0, NULL);
-- gtk_table_attach (GTK_TABLE (table), align, 0, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
-+ gtk_table_attach (GTK_TABLE (table), align, 0, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
- gtk_widget_show (align);
-
- label = g_object_new (GTK_TYPE_LABEL, "label", _("Appears if selection contains:"), "xalign", 0.0f, NULL);
-- gtk_table_attach (GTK_TABLE (table), label, 0, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
-+ gtk_table_attach (GTK_TABLE (table), label, 0, 2, 4, 5, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
- gtk_widget_show (label);
-
- align = g_object_new (GTK_TYPE_ALIGNMENT, "left-padding", 18, NULL);
-- gtk_table_attach (GTK_TABLE (table), align, 0, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
-+ gtk_table_attach (GTK_TABLE (table), align, 0, 2, 5, 6, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
- gtk_widget_show (align);
-
- itable = gtk_table_new (3, 2, TRUE);
-@@ -431,11 +454,11 @@
- gtk_widget_show (uca_editor->other_files_button);
-
- align = g_object_new (GTK_TYPE_ALIGNMENT, "height-request", 12, NULL);
-- gtk_table_attach (GTK_TABLE (table), align, 0, 2, 4, 5, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
-+ gtk_table_attach (GTK_TABLE (table), align, 0, 2, 6, 7, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
- gtk_widget_show (align);
-
- hbox = gtk_hbox_new (FALSE, 6);
-- gtk_table_attach (GTK_TABLE (table), hbox, 0, 2, 5, 6, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
-+ gtk_table_attach (GTK_TABLE (table), hbox, 0, 2, 7, 8, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
- gtk_widget_show (hbox);
-
- image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DND);
-@@ -746,6 +769,8 @@
- {
+ gchar *accel_path;
+ GdkModifierType accel_mods;
+@@ -116,6 +120,8 @@ thunar_uca_editor_class_init (ThunarUcaE
+ gtk_widget_class_bind_template_child (widget_class, ThunarUcaEditor, shortcut_button);
+ gtk_widget_class_bind_template_child (widget_class, ThunarUcaEditor, sn_button);
+ gtk_widget_class_bind_template_child (widget_class, ThunarUcaEditor, patterns_entry);
++ gtk_widget_class_bind_template_child (widget_class, ThunarUcaEditor, upper_button);
++ gtk_widget_class_bind_template_child (widget_class, ThunarUcaEditor, lower_button);
+ gtk_widget_class_bind_template_child (widget_class, ThunarUcaEditor, directories_button);
+ gtk_widget_class_bind_template_child (widget_class, ThunarUcaEditor, audio_files_button);
+ gtk_widget_class_bind_template_child (widget_class, ThunarUcaEditor, image_files_button);
+@@ -570,6 +576,8 @@ thunar_uca_editor_load (ThunarUcaEditor
ThunarUcaTypes types;
gchar *description;
-+ gchar *upper;
-+ gchar *lower;
gchar *patterns;
++ gchar *upper;
++ gchar *lower;
gchar *command;
gchar *icon_name;
-@@ -759,6 +784,8 @@
+ gchar *name;
+@@ -585,6 +593,8 @@ thunar_uca_editor_load (ThunarUcaEditor
/* determine the current values from the model */
gtk_tree_model_get (GTK_TREE_MODEL (uca_model), iter,
THUNAR_UCA_MODEL_COLUMN_DESCRIPTION, &description,
-+ THUNAR_UCA_MODEL_COLUMN_UPPER, &upper,
-+ THUNAR_UCA_MODEL_COLUMN_LOWER, &lower,
++ THUNAR_UCA_MODEL_COLUMN_UPPER, &upper,
++ THUNAR_UCA_MODEL_COLUMN_LOWER, &lower,
THUNAR_UCA_MODEL_COLUMN_PATTERNS, &patterns,
THUNAR_UCA_MODEL_COLUMN_COMMAND, &command,
THUNAR_UCA_MODEL_COLUMN_TYPES, &types,
-@@ -778,10 +805,14 @@
+@@ -614,11 +624,15 @@ thunar_uca_editor_load (ThunarUcaEditor
gtk_entry_set_text (GTK_ENTRY (uca_editor->patterns_entry), (patterns != NULL) ? patterns : "");
gtk_entry_set_text (GTK_ENTRY (uca_editor->command_entry), (command != NULL) ? command : "");
gtk_entry_set_text (GTK_ENTRY (uca_editor->name_entry), (name != NULL) ? name : "");
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (uca_editor->upper_button), (upper != NULL) ? g_strtod (upper, NULL) : -1.0);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (uca_editor->lower_button), (lower != NULL) ? g_strtod (lower, NULL) : -1.0);
+ gtk_button_set_label (GTK_BUTTON (uca_editor->shortcut_button), (accel_label != NULL) ? accel_label : _("None"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (uca_editor->sn_button), startup_notify);
/* cleanup */
@@ -111,13 +61,14 @@ diff -ru Thunar-1.6.15.orig/plugins/thunar-uca/thunar-uca-editor.c Thunar-1.6.15
g_free (patterns);
g_free (command);
g_free (icon_name);
-@@ -804,10 +835,16 @@
- ThunarUcaModel *uca_model,
+@@ -644,12 +658,17 @@ thunar_uca_editor_save (ThunarUcaEditor
GtkTreeIter *iter)
{
-+ gchar *upper_string;
-+ gchar *lower_string;
-+
+ gchar *unique_id;
++ gchar *upper_string;
++ gchar *lower_string;
+ GtkAccelKey key;
+
g_return_if_fail (THUNAR_UCA_IS_EDITOR (uca_editor));
g_return_if_fail (THUNAR_UCA_IS_MODEL (uca_model));
g_return_if_fail (iter != NULL);
@@ -125,22 +76,151 @@ diff -ru Thunar-1.6.15.orig/plugins/thunar-uca/thunar-uca-editor.c Thunar-1.6.15
+ upper_string = g_strdup_printf ("%d", gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (uca_editor->upper_button)));
+ lower_string = g_strdup_printf ("%d", gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (uca_editor->lower_button)));
+
- thunar_uca_model_update (uca_model, iter,
- gtk_entry_get_text (GTK_ENTRY (uca_editor->name_entry)),
- NULL, /* don't touch the unique id */
-@@ -816,6 +853,8 @@
+ gtk_tree_model_get (GTK_TREE_MODEL (uca_model), iter,
+ THUNAR_UCA_MODEL_COLUMN_UNIQUE_ID, &unique_id,
+ -1);
+@@ -666,6 +685,8 @@ thunar_uca_editor_save (ThunarUcaEditor
gtk_entry_get_text (GTK_ENTRY (uca_editor->command_entry)),
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (uca_editor->sn_button)),
gtk_entry_get_text (GTK_ENTRY (uca_editor->patterns_entry)),
-+ upper_string,
-+ lower_string,
- thunar_uca_editor_get_types (uca_editor));
- }
-
-diff -ru Thunar-1.6.15.orig/plugins/thunar-uca/thunar-uca-model.c Thunar-1.6.15/plugins/thunar-uca/thunar-uca-model.c
---- Thunar-1.6.15.orig/plugins/thunar-uca/thunar-uca-model.c 2018-04-27 18:34:10.000000000 -0400
-+++ Thunar-1.6.15/plugins/thunar-uca/thunar-uca-model.c 2018-04-27 18:35:36.000000000 -0400
-@@ -79,6 +79,8 @@
++ upper_string,
++ lower_string,
+ thunar_uca_editor_get_types (uca_editor),
+ uca_editor->accel_key,
+ uca_editor->accel_mods);
+diff -rudp thunar-4.16.10.orig/plugins/thunar-uca/thunar-uca-editor.ui thunar-4.16.10/plugins/thunar-uca/thunar-uca-editor.ui
+--- thunar-4.16.10.orig/plugins/thunar-uca/thunar-uca-editor.ui 2021-10-16 13:53:35.000000000 -0400
++++ thunar-4.16.10/plugins/thunar-uca/thunar-uca-editor.ui 2021-10-16 16:58:17.000000000 -0400
+@@ -17,6 +17,20 @@
+ <child>
+ <placeholder/>
+ </child>
++ <object class="GtkAdjustment" id="upper_adjustment">
++ <property name="lower">-1</property>
++ <property name="upper">9999</property>
++ <property name="value">-1</property>
++ <property name="step_increment">1</property>
++ <property name="page_increment">1</property>
++ </object>
++ <object class="GtkAdjustment" id="lower_adjustment">
++ <property name="lower">-1</property>
++ <property name="upper">9999</property>
++ <property name="value">-1</property>
++ <property name="step_increment">1</property>
++ <property name="page_increment">1</property>
++ </object>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="vbox">
+ <property name="can_focus">False</property>
+@@ -593,6 +607,68 @@
+ </packing>
+ </child>
+ <child>
++ <object class="GtkLabel" id="label98">
++ <property name="visible">True</property>
++ <property name="can_focus">False</property>
++ <property name="label" translatable="no">_Upper (max) number of files:</property>
++ <property name="use_underline">True</property>
++ <property name="mnemonic_widget">upper_button</property>
++ <property name="xalign">0</property>
++ <accessibility>
++ <relation type="label-for" target="upper_button"/>
++ </accessibility>
++ </object>
++ <packing>
++ <property name="left_attach">0</property>
++ <property name="top_attach">1</property>
++ </packing>
++ </child>
++ <child>
++ <object class="GtkSpinButton" id="upper_button">
++ <property name="visible">True</property>
++ <property name="can_focus">True</property>
++ <property name="hexpand">True</property>
++ <property name="adjustment">upper_adjustment</property>
++ <property name="climb-rate">1.0</property>
++ <property name="digits">0</property>
++ </object>
++ <packing>
++ <property name="left_attach">1</property>
++ <property name="top_attach">1</property>
++ </packing>
++ </child>
++ <child>
++ <object class="GtkLabel" id="label99">
++ <property name="visible">True</property>
++ <property name="can_focus">False</property>
++ <property name="label" translatable="no">_Lower (min) number of files:</property>
++ <property name="use_underline">True</property>
++ <property name="mnemonic_widget">lower_button</property>
++ <property name="xalign">0</property>
++ <accessibility>
++ <relation type="label-for" target="lower_button"/>
++ </accessibility>
++ </object>
++ <packing>
++ <property name="left_attach">0</property>
++ <property name="top_attach">2</property>
++ </packing>
++ </child>
++ <child>
++ <object class="GtkSpinButton" id="lower_button">
++ <property name="visible">True</property>
++ <property name="can_focus">True</property>
++ <property name="hexpand">True</property>
++ <property name="adjustment">lower_adjustment</property>
++ <property name="climb-rate">1.0</property>
++ <property name="digits">0</property>
++ </object>
++ <packing>
++ <property name="left_attach">1</property>
++ <property name="top_attach">2</property>
++ </packing>
++ </child>
++ <child>
+ <object class="GtkLabel" id="label17">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+@@ -602,7 +678,7 @@
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+- <property name="top_attach">1</property>
++ <property name="top_attach">3</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
+@@ -702,7 +778,7 @@
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+- <property name="top_attach">2</property>
++ <property name="top_attach">4</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
+@@ -745,7 +821,7 @@
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+- <property name="top_attach">4</property>
++ <property name="top_attach">6</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
+@@ -763,7 +839,7 @@
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+- <property name="top_attach">3</property>
++ <property name="top_attach">5</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
+diff -rudp thunar-4.16.10.orig/plugins/thunar-uca/thunar-uca-model.c thunar-4.16.10/plugins/thunar-uca/thunar-uca-model.c
+--- thunar-4.16.10.orig/plugins/thunar-uca/thunar-uca-model.c 2021-10-16 13:53:35.000000000 -0400
++++ thunar-4.16.10/plugins/thunar-uca/thunar-uca-model.c 2021-10-16 16:52:24.000000000 -0400
+@@ -79,6 +79,8 @@ typedef enum
PARSER_COMMAND,
PARSER_STARTUP_NOTIFY,
PARSER_PATTERNS,
@@ -149,57 +229,53 @@ diff -ru Thunar-1.6.15.orig/plugins/thunar-uca/thunar-uca-model.c Thunar-1.6.15/
PARSER_DESCRIPTION,
PARSER_DIRECTORIES,
PARSER_AUDIO_FILES,
-@@ -169,6 +171,8 @@
+@@ -168,6 +170,8 @@ struct _ThunarUcaModelItem
gchar *command;
guint startup_notify : 1;
gchar **patterns;
-+ gchar *upper;
-+ gchar *lower;
++ gchar *upper;
++ gchar *lower;
ThunarUcaTypes types;
/* derived attributes */
-@@ -190,6 +194,8 @@
+@@ -189,6 +193,8 @@ typedef struct
GString *command;
GString *patterns;
GString *description;
-+ GString *upper;
-+ GString *lower;
++ GString *upper;
++ GString *lower;
gboolean startup_notify;
gboolean description_use;
guint description_match;
-@@ -343,7 +349,13 @@
-
+@@ -333,6 +339,12 @@ thunar_uca_model_get_column_type (GtkTre
case THUNAR_UCA_MODEL_COLUMN_PATTERNS:
return G_TYPE_STRING;
--
-+
+
+ case THUNAR_UCA_MODEL_COLUMN_UPPER:
+ return G_TYPE_STRING;
-+
++
+ case THUNAR_UCA_MODEL_COLUMN_LOWER:
+ return G_TYPE_STRING;
-+
++
case THUNAR_UCA_MODEL_COLUMN_TYPES:
return G_TYPE_UINT;
-@@ -452,7 +464,15 @@
- str = g_strjoinv (";", item->patterns);
+@@ -442,6 +454,14 @@ thunar_uca_model_get_value (GtkTreeModel
g_value_take_string (value, str);
break;
--
-+
+
+ case THUNAR_UCA_MODEL_COLUMN_UPPER:
+ g_value_set_static_string (value, item->upper);
+ break;
-+
++
+ case THUNAR_UCA_MODEL_COLUMN_LOWER:
+ g_value_set_static_string (value, item->lower);
+ break;
-+
++
case THUNAR_UCA_MODEL_COLUMN_TYPES:
g_value_set_uint (value, item->types);
break;
-@@ -585,6 +605,8 @@
+@@ -574,6 +594,8 @@ thunar_uca_model_load_from_file (ThunarU
parser.icon_name = g_string_new (NULL);
parser.command = g_string_new (NULL);
parser.patterns = g_string_new (NULL);
@@ -208,16 +284,16 @@ diff -ru Thunar-1.6.15.orig/plugins/thunar-uca/thunar-uca-model.c Thunar-1.6.15/
parser.description = g_string_new (NULL);
parser.startup_notify = FALSE;
parser.unique_id_generated = FALSE;
-@@ -598,6 +620,8 @@
- /* cleanup */
+@@ -588,6 +610,8 @@ thunar_uca_model_load_from_file (ThunarU
g_markup_parse_context_free (context);
g_string_free (parser.description, TRUE);
+ g_string_free (parser.patterns, TRUE);
+ g_string_free (parser.upper, TRUE);
+ g_string_free (parser.lower, TRUE);
- g_string_free (parser.patterns, TRUE);
g_string_free (parser.command, TRUE);
g_string_free (parser.icon_name, TRUE);
-@@ -622,6 +646,8 @@
+ g_string_free (parser.unique_id, TRUE);
+@@ -611,6 +635,8 @@ thunar_uca_model_item_reset (ThunarUcaMo
{
/* release the previous values... */
g_strfreev (item->patterns);
@@ -226,16 +302,16 @@ diff -ru Thunar-1.6.15.orig/plugins/thunar-uca/thunar-uca-model.c Thunar-1.6.15/
g_free (item->description);
g_free (item->command);
g_free (item->name);
-@@ -679,6 +705,8 @@
+@@ -668,6 +694,8 @@ start_element_handler (GMarkupParseConte
g_string_truncate (parser->unique_id, 0);
g_string_truncate (parser->command, 0);
g_string_truncate (parser->patterns, 0);
-+ g_string_truncate (parser->upper, 0);
-+ g_string_truncate (parser->lower, 0);
++ g_string_truncate (parser->upper, 0);
++ g_string_truncate (parser->lower, 0);
g_string_truncate (parser->description, 0);
xfce_stack_push (parser->stack, PARSER_ACTION);
}
-@@ -736,6 +764,16 @@
+@@ -725,6 +753,16 @@ start_element_handler (GMarkupParseConte
g_string_truncate (parser->patterns, 0);
xfce_stack_push (parser->stack, PARSER_PATTERNS);
}
@@ -252,52 +328,48 @@ diff -ru Thunar-1.6.15.orig/plugins/thunar-uca/thunar-uca-model.c Thunar-1.6.15/
else if (strcmp (element_name, "description") == 0)
{
for (n = 0; attribute_names[n] != NULL; ++n)
-@@ -850,6 +888,8 @@
+@@ -833,6 +871,8 @@ end_element_handler (GMarkupParseContext
parser->command->str,
parser->startup_notify,
parser->patterns->str,
-+ parser->upper->str,
-+ parser->lower->str,
- parser->types);
++ parser->upper->str,
++ parser->lower->str,
+ parser->types,
+ 0, 0);
- /* check if a new id should've been generated */
-@@ -884,7 +924,17 @@
- if (strcmp (element_name, "patterns") != 0)
+@@ -869,6 +909,16 @@ end_element_handler (GMarkupParseContext
goto unknown_element;
break;
--
-+
+
+ case PARSER_UPPER:
+ if (strcmp (element_name, "upper") != 0)
+ goto unknown_element;
+ break;
-+
++
+ case PARSER_LOWER:
+ if (strcmp (element_name, "lower") != 0)
+ goto unknown_element;
+ break;
-+
++
case PARSER_DESCRIPTION:
if (strcmp (element_name, "description") != 0)
goto unknown_element;
-@@ -970,7 +1020,15 @@
- case PARSER_PATTERNS:
+@@ -959,6 +1009,14 @@ text_handler (GMarkupParseContext *conte
g_string_append_len (parser->patterns, text, text_len);
break;
--
-+
+
+ case PARSER_UPPER:
+ g_string_append_len (parser->upper, text, text_len);
+ break;
-+
++
+ case PARSER_LOWER:
+ g_string_append_len (parser->lower, text, text_len);
+ break;
-+
++
case PARSER_DESCRIPTION:
if (parser->description_use)
g_string_append_len (parser->description, text, text_len);
-@@ -1099,6 +1157,7 @@
+@@ -1087,6 +1145,7 @@ thunar_uca_model_match (ThunarUcaModel *
GList *lp;
gint n_files;
gint i, m, n;
@@ -305,34 +377,33 @@ diff -ru Thunar-1.6.15.orig/plugins/thunar-uca/thunar-uca-model.c Thunar-1.6.15/
gchar *path_test;
g_return_val_if_fail (THUNAR_UCA_IS_MODEL (uca_model), NULL);
-@@ -1143,7 +1202,16 @@
+@@ -1131,7 +1190,15 @@ thunar_uca_model_match (ThunarUcaModel *
{
/* check if we can just ignore this item */
item = (ThunarUcaModelItem *) lp->data;
- if (!item->multiple_selection && n_files > 1)
-+ upper = g_strtod(item->upper, NULL);
-+ lower = g_strtod(item->lower, NULL);
-+
++ upper = g_strtod (item->upper, NULL);
++ lower = g_strtod (item->lower, NULL);
++
+ if (upper == -1)
+ upper = n_files;
-+
+ if (lower == -1)
+ lower = n_files;
-+
++
+ if (((!item->multiple_selection) && (n_files > 1)) || (n_files > upper) || (n_files < lower))
continue;
/* match the specified files */
-@@ -1319,6 +1387,8 @@
+@@ -1321,6 +1388,8 @@ thunar_uca_model_update (ThunarUcaModel
const gchar *command,
gboolean startup_notify,
const gchar *patterns,
-+ const gchar *upper,
-+ const gchar *lower,
- ThunarUcaTypes types)
- {
- ThunarUcaModelItem *item;
-@@ -1339,6 +1409,10 @@
++ const gchar *upper,
++ const gchar *lower,
+ ThunarUcaTypes types,
+ guint accel_key,
+ GdkModifierType accel_mods)
+@@ -1344,6 +1413,10 @@ thunar_uca_model_update (ThunarUcaModel
item->icon_name = g_strdup (icon);
if (G_LIKELY (command != NULL && *command != '\0'))
item->command = g_strdup (command);
@@ -343,27 +414,27 @@ diff -ru Thunar-1.6.15.orig/plugins/thunar-uca/thunar-uca-model.c Thunar-1.6.15/
if (G_LIKELY (description != NULL && *description != '\0'))
item->description = g_strdup (description);
item->types = types;
-@@ -1439,12 +1513,16 @@
+@@ -1452,12 +1525,16 @@ thunar_uca_model_save (ThunarUcaModel *u
"\t<unique-id>%s</unique-id>\n"
"\t<command>%s</command>\n"
"\t<description>%s</description>\n"
-+ "\t<upper>%s</upper>\n"
-+ "\t<lower>%s</lower>\n"
++ "\t<upper>%s</upper>\n"
++ "\t<lower>%s</lower>\n"
"\t<patterns>%s</patterns>\n",
(item->icon_name != NULL) ? item->icon_name : "",
(item->name != NULL) ? item->name : "",
(item->unique_id != NULL) ? item->unique_id : "",
(item->command != NULL) ? item->command : "",
(item->description != NULL) ? item->description : "",
-+ (item->upper != NULL) ? item->upper : "",
-+ (item->lower != NULL) ? item->lower : "",
++ (item->upper != NULL) ? item->upper : "",
++ (item->lower != NULL) ? item->lower : "",
patterns);
fprintf (fp, "%s", escaped);
g_free (patterns);
-diff -ru Thunar-1.6.15.orig/plugins/thunar-uca/thunar-uca-model.h Thunar-1.6.15/plugins/thunar-uca/thunar-uca-model.h
---- Thunar-1.6.15.orig/plugins/thunar-uca/thunar-uca-model.h 2018-04-27 18:34:10.000000000 -0400
-+++ Thunar-1.6.15/plugins/thunar-uca/thunar-uca-model.h 2018-04-27 18:34:19.000000000 -0400
-@@ -44,6 +44,8 @@
+diff -rudp thunar-4.16.10.orig/plugins/thunar-uca/thunar-uca-model.h thunar-4.16.10/plugins/thunar-uca/thunar-uca-model.h
+--- thunar-4.16.10.orig/plugins/thunar-uca/thunar-uca-model.h 2021-10-16 13:53:35.000000000 -0400
++++ thunar-4.16.10/plugins/thunar-uca/thunar-uca-model.h 2021-10-16 16:52:24.000000000 -0400
+@@ -44,6 +44,8 @@ typedef enum
THUNAR_UCA_MODEL_COLUMN_UNIQUE_ID,
THUNAR_UCA_MODEL_COLUMN_COMMAND,
THUNAR_UCA_MODEL_COLUMN_STARTUP_NOTIFY,
@@ -372,19 +443,19 @@ diff -ru Thunar-1.6.15.orig/plugins/thunar-uca/thunar-uca-model.h Thunar-1.6.15/
THUNAR_UCA_MODEL_COLUMN_PATTERNS,
THUNAR_UCA_MODEL_COLUMN_TYPES,
THUNAR_UCA_MODEL_COLUMN_STOCK_LABEL,
-@@ -96,6 +98,8 @@
+@@ -96,6 +98,8 @@ void thunar_uca_model_update
const gchar *command,
gboolean startup_notify,
const gchar *patterns,
-+ const gchar *upper,
-+ const gchar *lower,
- ThunarUcaTypes types);
-
- gboolean thunar_uca_model_save (ThunarUcaModel *uca_model,
-diff -ru Thunar-1.6.15.orig/plugins/thunar-uca/uca.xml.in Thunar-1.6.15/plugins/thunar-uca/uca.xml.in
---- Thunar-1.6.15.orig/plugins/thunar-uca/uca.xml.in 2018-04-27 18:34:10.000000000 -0400
-+++ Thunar-1.6.15/plugins/thunar-uca/uca.xml.in 2018-04-27 18:34:19.000000000 -0400
-@@ -38,6 +38,8 @@
++ const gchar *upper,
++ const gchar *lower,
+ ThunarUcaTypes types,
+ guint accel_key,
+ GdkModifierType accel_mods);
+diff -rudp thunar-4.16.10.orig/plugins/thunar-uca/uca.xml.in thunar-4.16.10/plugins/thunar-uca/uca.xml.in
+--- thunar-4.16.10.orig/plugins/thunar-uca/uca.xml.in 2021-10-16 13:53:35.000000000 -0400
++++ thunar-4.16.10/plugins/thunar-uca/uca.xml.in 2021-10-16 16:52:24.000000000 -0400
+@@ -38,11 +38,25 @@
<action>
<icon>utilities-terminal</icon>
<patterns>*</patterns>
@@ -393,10 +464,10 @@ diff -ru Thunar-1.6.15.orig/plugins/thunar-uca/uca.xml.in Thunar-1.6.15/plugins/
<_name>Open Terminal Here</_name>
<command>exo-open --working-directory %f --launch TerminalEmulator</command>
<_description>Example for a custom action</_description>
-@@ -45,4 +47,15 @@
+ <startup-notify/>
<directories/>
</action>
-
++
+ <action>
+ <icon>preferences-desktop-wallpaper</icon>
+ <patterns>*</patterns>
@@ -404,8 +475,9 @@ diff -ru Thunar-1.6.15.orig/plugins/thunar-uca/uca.xml.in Thunar-1.6.15/plugins/
+ <upper>1</upper>
+ <_name>Set as wallpaper</_name>
+ <command>xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path --create -t string -s \"%f\"</command>
-+ <_description>Implementing the entire wallpaper plugin with just a bit of XML</_description>
-+ <image-files/>
++ <_description>Implementing the entire wallpaper plugin with just a bit of XML</_description>
++ <startup-notify/>
++ <directories/>
+ </action>
-+
+
</actions>