From 1801f59f49e33c662e42b4eaf954cbbfe95a9f6d Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sun, 23 Sep 2007 22:20:01 +0000 Subject: [PATCH] accept some of the ideas in ticket #343 -- add logo and description in `about' dialog, and unbundle our lock icon because gtk+ has a stock authentication icon. --- gtk/actions.c | 2 +- gtk/lock-icon.h | 53 ----------------------------------------- gtk/main.c | 16 +++++++------ gtk/torrent-inspector.c | 9 +++---- 4 files changed, 13 insertions(+), 67 deletions(-) delete mode 100644 gtk/lock-icon.h diff --git a/gtk/actions.c b/gtk/actions.c index 75556a4b7..e6f8797b8 100644 --- a/gtk/actions.c +++ b/gtk/actions.c @@ -120,7 +120,7 @@ BuiltinIconInfo; /* only one icon now... but room to grow ;) */ const BuiltinIconInfo my_builtin_icons [] = { - { tr_icon_full, "ICON_TRANSMISSION" } + { tr_icon_full, "transmission-logo" } }; static void diff --git a/gtk/lock-icon.h b/gtk/lock-icon.h deleted file mode 100644 index f51ddd2eb..000000000 --- a/gtk/lock-icon.h +++ /dev/null @@ -1,53 +0,0 @@ -/* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ - -#ifdef __SUNPRO_C -#pragma align 4 (my_pixbuf) -#endif -#ifdef __GNUC__ -static const guint8 lock_icon[] __attribute__ ((__aligned__ (4))) = -#else -static const guint8 lock_icon[] = -#endif -{ "" - /* Pixbuf magic (0x47646b50) */ - "GdkP" - /* length: header (24) + pixel_data (643) */ - "\0\0\2\233" - /* pixdata_type (0x2010002) */ - "\2\1\0\2" - /* rowstride (64) */ - "\0\0\0@" - /* width (16) */ - "\0\0\0\20" - /* height (16) */ - "\0\0\0\20" - /* pixel_data: */ - "\225\0\0\0\0\2\0\0\0i\0\0\0\273\202\0\0\0\306\3\0\0\0\301\0\0\0;\0\0" - "\0\1\207\0\0\0\0\4\0\0\0\20\36\36\36\224zzz\373\322\322\322\377\202\333" - "\333\333\377\4\274\274\274\376rrr\361\10\10\10\206\0\0\0\3\206\0\0\0" - "\0\4\23\23\23~\204\204\204\374\276\276\276\367888\362\202\34\34\34\371" - "\4MMM\374\261\261\261\377\204\204\204\366\0\0\0o\206\0\0\0\0\3---\353" - "\302\302\302\375\11\11\11\336\204\0\0\0\0\3...\374\252\252\252\376\0" - "\0\0\275\206\0\0\0\0\3+++\374\300\300\300\374\0\0\0\334\204\0\0\0\0\3" - "\26\26\26\372\301\300\300\377\0\0\0\340\205\0\0\0\0\5\0\0\0`\23\21\16" - "\370\233\227\224\377\40\35\34\377\13\13\7\377\202\4\3\2\377\7\5\4\3\377" - "/)!\377\250\243\236\377\32\23\13\377\0\0\0`\0\0\0\0\0\0\0\1\202\0\0\0" - "\0\3\0\0\0\377\245\221v\377\340\304\240\377\202\337\304\243\377\203\332" - "\276\232\377\6\326\272\224\377\315\246v\377\201Z+\377\0\0\0\377\0\0\0" - "\0\0\0\0\4\202\0\0\0\0\5\0\0\0\377\342\305\241\377\330\265\214\377\312" - "\237h\377\254\207X\377\202\247\202R\377\7\247\202S\377\243{K\377\274" - "\210I\377\254q.\377\0\0\0\377\0\0\0\0\0\0\0\5\202\0\0\0\0\5\0\0\0\377" - "\343\306\242\377\325\256~\377\260\215_\377\325\262\204\377\202\317\253" - "|\377\5\317\254{\377\313\244q\377\274\207F\377\252o+\377\0\0\0\377\204" - "\0\0\0\0\5\0\0\0\377\341\304\240\377\320\246t\377\307\233d\377\252\204" - "U\377\203\244~N\377\4\240wD\377\272\204B\377\254q.\377\0\0\0\377\204" - "\0\0\0\0\5\0\0\0\377\341\302\234\377\316\244p\377\255\215d\377\322\262" - "\211\377\202\315\254\203\377\5\316\255\203\377\314\247{\377\270\200>" - "\377\255s2\377\0\0\0\377\204\0\0\0\0\5\0\0\0\377\340\302\236\377\324" - "\254y\377\315\246n\377\257\215^\377\202\253\207X\377\5\253\210X\377\250" - "\201L\377\274\207F\377\264~>\377\0\0\0\377\204\0\0\0\0\3\0\0\0\377\320" - "\250t\377\306\226]\377\202\276\215P\377\202\272\211K\377\5\275\214N\377" - "\274\212L\377\272\206G\377\244q6\377\0\0\0\377\204\0\0\0\0\1\0\0\0`\212" - "\0\0\0\377\1\0\0\0w\222\0\0\0\0"}; - - diff --git a/gtk/main.c b/gtk/main.c index ff6ca54fd..d3b59a6c3 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -390,7 +390,7 @@ gtksetup( int * argc, char *** argv, struct cbdata * callback_data ) "}\n" "widget \"TransmissionDialog\" style \"transmission-standard\"\n" ); - gtk_window_set_default_icon_name ( "ICON_TRANSMISSION" ); + gtk_window_set_default_icon_name ( "transmission-logo" ); } static void @@ -902,12 +902,14 @@ about ( void ) gtk_about_dialog_set_license (a, LICENSE); gtk_about_dialog_set_wrap_license (a, TRUE); #endif - gtk_about_dialog_set_website (a, "http://transmission.m0k.org/"); - gtk_about_dialog_set_copyright (a, _("Copyright 2005-2007 The Transmission Project")); - gtk_about_dialog_set_authors (a, authors); - gtk_about_dialog_set_translator_credits (a, _("translator-credits")); - g_signal_connect_swapped (w, "response", G_CALLBACK (gtk_widget_destroy), w); - gtk_widget_show_all (w); + gtk_about_dialog_set_logo_icon_name( a, "transmission-logo" ); + gtk_about_dialog_set_comments( a, _("A GTK+ BitTorrent Client.") ); + gtk_about_dialog_set_website( a, "http://transmission.m0k.org/" ); + gtk_about_dialog_set_copyright( a, _("Copyright 2005-2007 The Transmission Project") ); + gtk_about_dialog_set_authors( a, authors ); + gtk_about_dialog_set_translator_credits( a, _("translator-credits") ); + g_signal_connect_swapped( w, "response", G_CALLBACK (gtk_widget_destroy), w ); + gtk_widget_show_all( w ); } static void diff --git a/gtk/torrent-inspector.c b/gtk/torrent-inspector.c index 68396c1d3..91ffa2985 100644 --- a/gtk/torrent-inspector.c +++ b/gtk/torrent-inspector.c @@ -33,7 +33,6 @@ #include "actions.h" #include "tr_torrent.h" #include "dot-icons.h" -#include "lock-icon.h" #include "hig.h" #include "torrent-inspector.h" #include "util.h" @@ -359,14 +358,12 @@ render_encrypted (GtkTreeViewColumn * column UNUSED, GtkTreeIter * iter, gpointer data UNUSED) { - static GdkPixbuf * lock = NULL; gboolean is_encrypted = FALSE; gtk_tree_model_get (tree_model, iter, PEER_COL_IS_ENCRYPTED, &is_encrypted, -1); - if (!lock) lock = gdk_pixbuf_new_from_inline (-1, lock_icon, FALSE, NULL); g_object_set (renderer, "xalign", (gfloat)0.0, "yalign", (gfloat)0.5, - "pixbuf", (is_encrypted ? lock : NULL), + "stock-id", (is_encrypted ? GTK_STOCK_DIALOG_AUTHENTICATION : NULL), NULL); } @@ -573,7 +570,7 @@ static GtkWidget* peer_page_new ( TrTorrent * gtor ) r = gtk_cell_renderer_pixbuf_new (); c = gtk_tree_view_column_new_with_attributes (t, r, NULL); gtk_tree_view_column_set_sizing (c, GTK_TREE_VIEW_COLUMN_FIXED); - gtk_tree_view_column_set_fixed_width (c, 32); + gtk_tree_view_column_set_fixed_width (c, 20); gtk_tree_view_column_set_cell_data_func (c, r, render_encrypted, NULL, NULL); break; @@ -583,7 +580,7 @@ static GtkWidget* peer_page_new ( TrTorrent * gtor ) r = gtk_cell_renderer_pixbuf_new (); c = gtk_tree_view_column_new_with_attributes (t, r, NULL); gtk_tree_view_column_set_sizing (c, GTK_TREE_VIEW_COLUMN_FIXED); - gtk_tree_view_column_set_fixed_width (c, 32); + gtk_tree_view_column_set_fixed_width (c, 20); gtk_tree_view_column_set_cell_data_func (c, r, render_connection, NULL, NULL); break;