From: <sa...@us...> - 2006-10-04 02:52:46
|
Revision: 17407 http://svn.sourceforge.net/gaim/?rev=17407&view=rev Author: sadrul Date: 2006-09-29 20:49:00 -0700 (Fri, 29 Sep 2006) Log Message: ----------- Selecting 'Rename' or 'Alias' in the buddylist should always work now. Also, set the properties depending on GTK+ version. Modified Paths: -------------- trunk/gtk/gtkblist.c Modified: trunk/gtk/gtkblist.c =================================================================== --- trunk/gtk/gtkblist.c 2006-09-30 03:08:47 UTC (rev 17406) +++ trunk/gtk/gtkblist.c 2006-09-30 03:49:00 UTC (rev 17407) @@ -406,7 +406,12 @@ g_object_set(G_OBJECT(gtkblist->text_rend), "editable", TRUE, NULL); gtk_tree_view_set_enable_search (GTK_TREE_VIEW(gtkblist->treeview), FALSE); gtk_widget_grab_focus(gtkblist->treeview); +#if GTK_CHECK_VERSION(2,2,0) + gtk_tree_view_set_cursor_on_cell(GTK_TREE_VIEW(gtkblist->treeview), path, + gtkblist->text_column, gtkblist->text_rend, TRUE); +#else gtk_tree_view_set_cursor(GTK_TREE_VIEW(gtkblist->treeview), path, gtkblist->text_column, TRUE); +#endif gtk_tree_path_free(path); } @@ -3984,17 +3989,21 @@ gtk_tree_view_column_pack_start(column, rend, FALSE); gtk_tree_view_column_set_attributes(column, rend, "expander-visible", GROUP_EXPANDER_COLUMN, +#if GTK_CHECK_VERSION(2,6,0) "sensitive", GROUP_EXPANDER_COLUMN, "cell-background-gdk", BGCOLOR_COLUMN, +#endif NULL); rend = gaim_gtk_cell_renderer_expander_new(); gtk_tree_view_column_pack_start(column, rend, FALSE); gtk_tree_view_column_set_attributes(column, rend, "expander-visible", CONTACT_EXPANDER_COLUMN, +#if GTK_CHECK_VERSION(2,6,0) "sensitive", CONTACT_EXPANDER_COLUMN, + "cell-background-gdk", BGCOLOR_COLUMN, +#endif "visible", CONTACT_EXPANDER_VISIBLE_COLUMN, - "cell-background-gdk", BGCOLOR_COLUMN, NULL); rend = gtk_cell_renderer_pixbuf_new(); @@ -4002,14 +4011,18 @@ gtk_tree_view_column_set_attributes(column, rend, "pixbuf", STATUS_ICON_COLUMN, "visible", STATUS_ICON_VISIBLE_COLUMN, +#if GTK_CHECK_VERSION(2,6,0) "cell-background-gdk", BGCOLOR_COLUMN, +#endif NULL); g_object_set(rend, "xalign", 0.0, "ypad", 0, NULL); gtkblist->text_rend = rend = gtk_cell_renderer_text_new(); gtk_tree_view_column_pack_start (column, rend, TRUE); gtk_tree_view_column_set_attributes(column, rend, +#if GTK_CHECK_VERSION(2,6,0) "cell-background-gdk", BGCOLOR_COLUMN, +#endif "markup", NAME_COLUMN, NULL); g_signal_connect(G_OBJECT(rend), "edited", G_CALLBACK(gtk_blist_renderer_edited_cb), NULL); @@ -4025,14 +4038,18 @@ gtk_tree_view_column_set_attributes(column, rend, "markup", IDLE_COLUMN, "visible", IDLE_VISIBLE_COLUMN, +#if GTK_CHECK_VERSION(2,6,0) "cell-background-gdk", BGCOLOR_COLUMN, +#endif NULL); rend = gtk_cell_renderer_pixbuf_new(); g_object_set(rend, "xalign", 1.0, "ypad", 0, NULL); gtk_tree_view_column_pack_start(column, rend, FALSE); gtk_tree_view_column_set_attributes(column, rend, "pixbuf", BUDDY_ICON_COLUMN, +#if GTK_CHECK_VERSION(2,6,0) "cell-background-gdk", BGCOLOR_COLUMN, +#endif "visible", BUDDY_ICON_VISIBLE_COLUMN, NULL); @@ -4416,7 +4433,7 @@ mark = g_strdup_printf("<span color='#%02x%02x%02x' weight='bold'>%s</span>%s", textcolor.red>>8, textcolor.green>>8, textcolor.blue>>8, esc, group_count); - + g_free(esc); gtk_tree_store_set(gtkblist->treemodel, &iter, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |