changeset 7931:2a781d4178ba

[gaim-migrate @ 8602] Make the prefs away message tree view thing actually scroll when you use the arrow keys to scroll through your away messages. Same for the privacy lists and for list of users in a chat. Although, the last one you can't use the keyboard because input is stolen by the text input box. Make the menu item for blocking users gray out if the protocol doesn't support it. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Fri, 26 Dec 2003 20:34:58 +0000
parents 68f70cf074d0
children 049443a8c76b
files src/gtkconv.c src/gtkprefs.c src/gtkprefs.h src/gtkprivacy.c
diffstat 4 files changed, 15 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkconv.c	Fri Dec 26 19:07:55 2003 +0000
+++ b/src/gtkconv.c	Fri Dec 26 20:34:58 2003 +0000
@@ -2207,7 +2207,7 @@
 				gtk_widget_set_sensitive(gtkwin->menu.alias, TRUE);
 		}
 
-		gtk_widget_set_sensitive(gtkwin->menu.block, TRUE);
+		gtk_widget_set_sensitive(gtkwin->menu.block, (prpl_info->add_deny != NULL));
 		gtk_widget_set_sensitive(gtkwin->menu.add, TRUE);
 		gtk_widget_set_sensitive(gtkwin->menu.remove, TRUE);
 		gtk_widget_set_sensitive(gtkwin->menu.insert_link, TRUE);
@@ -3293,7 +3293,7 @@
 										   GAIM_STOCK_INVITE, GAIM_CONV_CHAT);
 	gtk_tooltips_set_tip(gtkconv->tooltips, gtkchat->invite,
 						 _("Invite a user"), NULL);
-	gtk_box_pack_end(GTK_BOX(parent), gtkchat->invite, FALSE, FALSE, 0);
+	gtk_box_pack_start(GTK_BOX(parent), gtkchat->invite, FALSE, FALSE, 0);
 
 	/* Add button */
 	gtkconv->add = gaim_gtk_change_text(_("Add"), gtkconv->add,
@@ -3611,6 +3611,7 @@
 	sw2 = gtk_scrolled_window_new(NULL, NULL);
 	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw2),
 								   GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
+	gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw2), GTK_SHADOW_IN);
 	gtk_box_pack_start(GTK_BOX(lbox), sw2, TRUE, TRUE, 0);
 	gtk_widget_show(sw2);
 
@@ -3643,7 +3644,7 @@
 
 	gtkchat->list = list;
 
-	gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw2), list);
+	gtk_container_add(GTK_CONTAINER(sw2), list);
 
 	/* Setup the user list toolbar. */
 	bbox = gtk_hbox_new(TRUE, 5);
--- a/src/gtkprefs.c	Fri Dec 26 19:07:55 2003 +0000
+++ b/src/gtkprefs.c	Fri Dec 26 20:34:58 2003 +0000
@@ -97,7 +97,7 @@
 static void delete_prefs(GtkWidget *, void *);
 static void update_plugin_list(void *data);
 
-void set_default_away(GtkWidget *, gpointer);
+static void set_default_away(GtkWidget *, gpointer);
 
 static void
 update_spin_value(GtkWidget *w, GtkWidget *spin)
@@ -569,7 +569,7 @@
 
 	sw = gtk_scrolled_window_new(NULL,NULL);
 	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
-	gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN);
+	gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN);
 
 	gtk_box_pack_start(GTK_BOX(ret), sw, TRUE, TRUE, 0);
 	smiley_theme_store = gtk_list_store_new (3, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING);
@@ -1766,7 +1766,6 @@
 	rend = gtk_cell_renderer_toggle_new();
 	sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (event_view));
 
-	
 	col = gtk_tree_view_column_new_with_attributes (_("Load"),
 							rend,
 							"active", 0,
@@ -2169,6 +2168,7 @@
 	sg = gtk_size_group_new(GTK_SIZE_GROUP_BOTH);
 
 	sw = gtk_scrolled_window_new(NULL,NULL);
+	gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN);
 	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
 	gtk_box_pack_start(GTK_BOX(ret), sw, TRUE, TRUE, 0);
 
@@ -2191,15 +2191,17 @@
 	gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col);
 	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(event_view), FALSE);
 	gtk_widget_show(event_view);
-	gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), event_view);
+	gtk_container_add(GTK_CONTAINER(sw), event_view);
 
 	sw = gtk_scrolled_window_new(NULL, NULL);
+	gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN);
 	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
 				       GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
 	gtk_box_pack_start(GTK_BOX(ret), sw, TRUE, TRUE, 0);
 
 	away_text = gtk_imhtml_new(NULL, NULL);
-	gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), away_text);
+	gtk_container_add(GTK_CONTAINER(sw), away_text);
+
 	gaim_setup_imhtml(away_text);
 	sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (event_view));
 	g_signal_connect(G_OBJECT(sel), "changed",
--- a/src/gtkprefs.h	Fri Dec 26 19:07:55 2003 +0000
+++ b/src/gtkprefs.h	Fri Dec 26 20:34:58 2003 +0000
@@ -41,13 +41,6 @@
 void gaim_gtk_prefs_show(void);
 
 /**
- * Sets the default away message.
- *
- * @todo This should be moved or renamed or something?
- */
-void set_default_away(GtkWidget *, gpointer);
-
-/**
  * Initializes the default away menu.
  *
  * @todo This should be moved or renamed or something?
--- a/src/gtkprivacy.c	Fri Dec 26 19:07:55 2003 +0000
+++ b/src/gtkprivacy.c	Fri Dec 26 20:34:58 2003 +0000
@@ -156,8 +156,9 @@
 
 	sw = gtk_scrolled_window_new(NULL, NULL);
 	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
-								   GTK_POLICY_NEVER,
-								   GTK_POLICY_AUTOMATIC);
+								   GTK_POLICY_AUTOMATIC,
+								   GTK_POLICY_ALWAYS);
+	gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN);
 
 	treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(model));
 	*ret_treeview = treeview;
@@ -170,7 +171,7 @@
 	gtk_tree_view_column_set_clickable(GTK_TREE_VIEW_COLUMN(column), TRUE);
 	gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column);
 	gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(treeview), FALSE);
-	gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), treeview);
+	gtk_container_add(GTK_CONTAINER(sw), treeview);
 
 	gtk_widget_show(treeview);