Package: twitux Version: 0.69-4 Severity: wishlist Tags: patch I think I reported this upstream as well.
I have made up a patch that adds a ReTweet feature to twitux hotkeyed to F6. Patch Attached Thanks, Luke -- System Information: Debian Release: squeeze/sid APT prefers testing APT policy: (900, 'testing'), (850, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.30-2-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages twitux depends on: ii dbus-x11 1.2.16-2 simple interprocess messaging syst ii gconf2 2.28.0-1 GNOME configuration database syste ii gnome-keyring 2.28.1-1 GNOME keyring services (daemon and ii libc6 2.10.1-5 GNU C Library: Shared libraries ii libcanberra-gtk0 0.22-1 Gtk+ helper for playing widget eve ii libcanberra0 0.22-1 a simple abstract interface for pl ii libdbus-1-3 1.2.16-2 simple interprocess messaging syst ii libdbus-glib-1-2 0.82-2 simple interprocess messaging syst ii libenchant1c2a 1.4.2-3.3 a wrapper library for various spel ii libgconf2-4 2.28.0-1 GNOME configuration database syste ii libglib2.0-0 2.22.2-2 The GLib library of C routines ii libgnome-keyring0 2.28.1-1 GNOME keyring services library ii libgtk2.0-0 2.18.3-1 The GTK+ graphical user interface ii libnotify1 [libnotify1-gtk2 0.4.5-1 sends desktop notifications to a n ii libsexy2 0.1.11-2+b1 collection of additional GTK+ widg ii libsoup2.4-1 2.28.1-2 an HTTP library implementation in ii libxml2 2.7.6.dfsg-1 GNOME XML library twitux recommends no packages. twitux suggests no packages. -- no debconf information -- Luke Cycon <lcy...@gmail.com>
# Patch by Luke Cycon <lcy...@gmail.com> # # Add a retweet feature to Twitux --- a/data/main_window.xml Sun Nov 01 08:53:53 2009 -0800 +++ b/data/main_window.xml Sun Nov 01 08:53:57 2009 -0800 @@ -33,6 +33,13 @@ <accelerator key="N" modifiers="GDK_CONTROL_MASK"/> </child> <child> + <object class="GtkAction" id="twitter_retweet"> + <property name="name">twitter_retweet</property> + <property name="label" translatable="no">ReTweet</property> + </object> + <accelerator key="F6" modifiers="0"/> + </child> + <child> <object class="GtkAction" id="twitter_send_direct_message"> <property name="name">twitter_send_direct_message</property> <property name="label" translatable="yes">Send Direct Message</property> @@ -161,6 +168,7 @@ <menuitem action="twitter_disconnect"/> <separator/> <menuitem action="twitter_new_message"/> + <menuitem action="twitter_retweet"/> <menuitem action="twitter_send_direct_message"/> <separator/> <menuitem action="twitter_add_friend"/> --- a/src/twitux-app.c Sun Nov 01 08:53:53 2009 -0800 +++ b/src/twitux-app.c Sun Nov 01 08:53:57 2009 -0800 @@ -147,6 +147,8 @@ TwituxApp *app); static void app_new_message_cb (GtkWidget *window, TwituxApp *app); +static void app_retweet_cb (GtkWidget *widget, + TwituxApp *app); static void app_send_direct_message_cb (GtkWidget *window, TwituxApp *app); static void app_quit_cb (GtkWidget *window, @@ -499,6 +501,7 @@ "twitter_connect", "activate", app_connect_cb, "twitter_disconnect", "activate", app_disconnect_cb, "twitter_new_message", "activate", app_new_message_cb, + "twitter_retweet", "activate", app_retweet_cb, "twitter_send_direct_message", "activate", app_send_direct_message_cb, "twitter_refresh", "activate", app_refresh_cb, "twitter_quit", "activate", app_quit_cb, @@ -792,6 +795,13 @@ } static void +app_retweet_cb (GtkWidget *widget, + TwituxApp *app) +{ + twitux_tweet_list_retweet(); +} + +static void app_send_direct_message_cb (GtkWidget *widget, TwituxApp *app) { --- a/src/twitux-tweet-list.c Sun Nov 01 08:53:53 2009 -0800 +++ b/src/twitux-tweet-list.c Sun Nov 01 08:53:57 2009 -0800 @@ -281,6 +281,41 @@ g_free (message); } +void +twitux_tweet_list_retweet () +{ + TwituxTweetListPriv *priv; + GtkTreeSelection *sel; + GtkTreeIter iter; + GtkTreeView *tree; + gchar *user; + gchar *message; + + priv = GET_PRIV (list); + + tree = &list->parent; + + sel = gtk_tree_view_get_selection (tree); + + if (!gtk_tree_selection_get_selected (sel, NULL, &iter)) + return; + + gtk_tree_model_get (GTK_TREE_MODEL (priv->store), + &iter, + STRING_USER, &user, + -1); + + gtk_tree_model_get (GTK_TREE_MODEL (priv->store), + &iter, + STRING_TWEET, &message, + -1); + + message = g_strdup_printf ("RT @%s: %s", user, message); + twitux_send_message_dialog_show (NULL); + twitux_message_show_friends (FALSE); + twitux_message_set_message (message); +} + TwituxTweetList * twitux_tweet_list_new (void) { --- a/src/twitux-tweet-list.h Sun Nov 01 08:53:53 2009 -0800 +++ b/src/twitux-tweet-list.h Sun Nov 01 08:53:57 2009 -0800 @@ -51,6 +51,7 @@ }; GType twitux_tweet_list_get_type (void) G_GNUC_CONST; +void twitux_tweet_list_retweet (void); TwituxTweetList * twitux_tweet_list_new (void); GtkListStore * twitux_tweet_list_get_store (void);