[hackers] [surf] Make »Copy image address« work. || Christoph Lohmann

2014-09-27 Thread git
commit dd705d43eb13493b682e214748d1810fc6254452
Author: Christoph Lohmann <2...@r-36.net>
Date:   Sun Sep 28 08:02:48 2014 +0200

Make »Copy image address« work.

Thanks y...@blekksprut.net for the patch!

diff --git a/surf.c b/surf.c
index bcb3a7b..3b3476a 100644
--- a/surf.c
+++ b/surf.c
@@ -968,6 +968,7 @@ menuactivate(GtkMenuItem *item, Client *c) {
 * context-menu-action-1open link in window
 * context-menu-action-2download linked file
 * context-menu-action-3copy link location
+* context-menu-action-7copy image address
 * context-menu-action-13   reload
 * context-menu-action-10   back
 * context-menu-action-11   forward
@@ -975,8 +976,8 @@ menuactivate(GtkMenuItem *item, Client *c) {
 */
 
GtkAction *a = NULL;
-   const char *name;
-   GtkClipboard *prisel;
+   const char *name, *uri;
+   GtkClipboard *prisel, *clpbrd;
 
a = gtk_activatable_get_related_action(GTK_ACTIVATABLE(item));
if(a == NULL)
@@ -986,7 +987,13 @@ menuactivate(GtkMenuItem *item, Client *c) {
if(!g_strcmp0(name, "context-menu-action-3")) {
prisel = gtk_clipboard_get(GDK_SELECTION_PRIMARY);
gtk_clipboard_set_text(prisel, c->linkhover, -1);
-   }
+   } else if(!g_strcmp0(name, "context-menu-action-7")) {
+   prisel = gtk_clipboard_get(GDK_SELECTION_PRIMARY);
+   clpbrd = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
+   uri = gtk_clipboard_wait_for_text(clpbrd);
+   if(uri)
+   gtk_clipboard_set_text(prisel, uri, -1);
+  }
 }
 
 static void




[hackers] [surf] Minor style change. || Christoph Lohmann

2014-09-27 Thread git
commit 3e89b4451cfac593e233e449b9a403720598b08f
Author: Christoph Lohmann <2...@r-36.net>
Date:   Sun Sep 28 08:03:42 2014 +0200

Minor style change.

diff --git a/surf.c b/surf.c
index 3b3476a..6beda59 100644
--- a/surf.c
+++ b/surf.c
@@ -993,7 +993,7 @@ menuactivate(GtkMenuItem *item, Client *c) {
uri = gtk_clipboard_wait_for_text(clpbrd);
if(uri)
gtk_clipboard_set_text(prisel, uri, -1);
-  }
+   }
 }
 
 static void




Re: [hackers] [st] Add missed names of charset sequences || Roberto E. Vargas Caballero

2014-09-27 Thread Roberto E. Vargas Caballero
> It is a known issue with the hook, it only really monitors
> the master branch.

Long time ago I did something similar for a project where I
was working. I think solution could be to add an update hook
similar to this:

#!/bin/sh

repo=`basename $PWD`
refname=$1
oldrev=$2
newrev=$3

tohackers()
{
for i in $*
do
subject=`git log -1 --prety-format:"%s || %an" $i`
git log -1 -p |
mail -s "[$repo] $subject" "hackers@suckless.org"
done
}

case $type,$oldrev in
commit,0+$)
tohackers `git rev-list $newrev`
;;
commit)
tohackers `git rev-list $oldrev..$newrev`
;;
.)
;;
esac


And other point, how is it possible that ed, the standard editor!!!,
is not installed in a suckless machine?!?!?!!!

Regards,

-- 
Roberto E. Vargas Caballero