aboutsummaryrefslogtreecommitdiff
path: root/dragon-v1.1.1.diff
diff options
context:
space:
mode:
Diffstat (limited to 'dragon-v1.1.1.diff')
-rw-r--r--dragon-v1.1.1.diff39
1 files changed, 39 insertions, 0 deletions
diff --git a/dragon-v1.1.1.diff b/dragon-v1.1.1.diff
new file mode 100644
index 0000000..43f4489
--- /dev/null
+++ b/dragon-v1.1.1.diff
@@ -0,0 +1,39 @@
+Author: bgstack15
+Date: 2021-07-22
+Upstream version: 1.1.1
+Message: drop-videos uses a customized dragon binary that uses environment variable DRAGON_ICON as the chosen icon on the button that is the drop target.
+
+diff --git a/dragon.c b/dragon.c
+index 39db68e..cff9608 100644
+--- a/dragon.c
++++ b/dragon.c
+@@ -24,7 +24,7 @@
+ #include <stdbool.h>
+ #include <string.h>
+
+-#define VERSION "1.1.1"
++#define VERSION "1.1.2"
+
+
+ GtkWidget *window;
+@@ -334,7 +334,19 @@ drag_data_received (GtkWidget *widget,
+
+ void add_target_button() {
+ GtkWidget *label = gtk_button_new();
+- gtk_button_set_label(GTK_BUTTON(label), "Drag something here...");
++ gtk_button_set_label(GTK_BUTTON(label), "Drop\nhere");
++ // Custom for drop-videos, 12
++ char *dragon_icon = getenv("DRAGON_ICON");
++ if ((dragon_icon != NULL) && (dragon_icon[0] != '\0')) {
++ GtkIconInfo *icon_info = icon_info = icon_info_from_content_type(dragon_icon);
++ if (icon_info) {
++ GtkWidget *image = gtk_image_new_from_pixbuf(
++ gtk_icon_info_load_icon(icon_info, NULL));
++ gtk_button_set_image(GTK_BUTTON(label), image);
++ gtk_button_set_always_show_image(GTK_BUTTON(label), true);
++ };
++ gtk_button_set_label(GTK_BUTTON(label), "");
++ };
+ gtk_container_add(GTK_CONTAINER(vbox), label);
+ GtkTargetList *targetlist = gtk_drag_dest_get_target_list(GTK_WIDGET(label));
+ if (targetlist)
bgstack15