Remove & from tags as they cause issue when displaying \
[debian/pino.git] / debian / patches / 002_allow-current-user-info.diff
1 Description: Allows current user to display her own information & timeline
2 Author: Julien Valroff <julien@kirya.net>
3 Bug: http://code.google.com/p/pino-twitter/issues/detail?id=268
4 Forwarded: yes
5
6 --- a/src/user_info_list.vala
7 +++ b/src/user_info_list.vala
8 @@ -167,9 +167,6 @@
9         
10         /* get user full info and his timeline */
11         public void show_user(string screen_name) {
12 -               if(accounts.get_current_account().login == screen_name)
13 -                       return;
14 -               
15                 act.activate();
16                 
17                 if(full_status != null && full_status.user_screen_name == screen_name)
18 --- a/templates/status_me.tpl
19 +++ b/templates/status_me.tpl
20 @@ -1,5 +1,5 @@
21  <div class="status">
22 -       <div class="avatar_me" style="background-image:url('{{avatar}}');"></div>
23 +       <a href="userinfo://{{screen_name}}"><div class="avatar_me" style="background-image:url('{{avatar}}');"></div></a>
24         <div class="content_{{me}}" id="{{id}}">
25                 <div class="header">
26                         <span class="date">{{time}}</span>
27 --- a/src/template.vala
28 +++ b/src/template.vala
29 @@ -66,7 +66,7 @@
30                 urls = new Regex("((http|https|ftp)://([\\S]+))"); //need something better
31                 */
32                 nicks = new Regex("(^|\\s|['\"+&!/\\(-])@([A-Za-z0-9_]+)");
33 -               tags = new Regex("(^|\\s|['\"+&!/\\(-])#([A-Za-z0-9_.-\\p{Latin}\\p{Greek}]+)");
34 +               tags = new Regex("(^|\\s|['\"+!/\\(-])#([A-Za-z0-9_.-\\p{Latin}\\p{Greek}]+)");
35                 groups = new Regex("(^|\\s|['\"+&!/\\(-])!([A-Za-z0-9_]+)"); //for identi.ca groups
36                 urls = new Regex("((https?|ftp)://([A-Za-z0-9+&@#/%?=~_|!:,.;-]*)([A-Za-z0-9+&@#/%=~_|$]))"); // still needs to be improved for urls containing () such as wikipedia's
37                 
38 @@ -287,6 +287,7 @@
39                                 map["id"] = i.id;
40                                 map["time"] = time;
41                                 map["by_who"] = by_who;
42 +                               map["screen_name"] = i.user_screen_name;
43                                 
44                                 if(prefs.fullNames)
45                                         map["name"] = i.user_name;