gconf-editor r1364 - in trunk: . src



Author: jjongsma
Date: Mon Aug  4 16:56:32 2008
New Revision: 1364
URL: http://svn.gnome.org/viewvc/gconf-editor?rev=1364&view=rev

Log:
	* src/gedit-output-window.c: Modify the buttons for the search results pane
	so that the icons aren't clipped and difficult to determine what they are
	(bug #518297).



Modified:
   trunk/ChangeLog
   trunk/src/gedit-output-window.c

Modified: trunk/src/gedit-output-window.c
==============================================================================
--- trunk/src/gedit-output-window.c	(original)
+++ trunk/src/gedit-output-window.c	Mon Aug  4 16:56:32 2008
@@ -334,6 +334,16 @@
 	}
 }
 
+static void
+gedit_output_window_format_button (GtkButton* button, gint w, gint h)
+{
+	GtkRcStyle* rc = gtk_widget_get_modifier_style (GTK_WIDGET (button));
+	rc->xthickness = 0;
+	rc->ythickness = 0;
+	gtk_button_set_relief (button, GTK_RELIEF_NONE);
+	gtk_button_set_focus_on_click (button, FALSE);
+}
+
 static void 
 gedit_output_window_init (GeditOutputWindow  *output_window)
 {
@@ -362,7 +372,7 @@
 	settings = gtk_widget_get_settings (GTK_WIDGET (output_window));
 
 	gtk_icon_size_lookup_for_settings (settings,
-					   GTK_ICON_SIZE_SMALL_TOOLBAR,
+					   GTK_ICON_SIZE_MENU,
 					   &w, &h);
 
 	vbox1 = gtk_vbox_new (FALSE, 2);
@@ -371,16 +381,15 @@
 	/* Create the close button */
 	output_window->priv->close_button = gtk_button_new ();
 	gtk_box_pack_start (GTK_BOX (vbox1), output_window->priv->close_button, FALSE, FALSE, 0);
-	gtk_widget_set_size_request (output_window->priv->close_button, w + 2, h + 2);
 
 	gtk_tooltips_set_tip (output_window->priv->tooltips, 
 			      output_window->priv->close_button, 
 			      _("Close the output window"), 
 			      NULL);
 
-	gtk_button_set_relief (GTK_BUTTON (output_window->priv->close_button), GTK_RELIEF_NONE);
+	gedit_output_window_format_button (GTK_BUTTON (output_window->priv->close_button), w, h);
 
-	image = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_SMALL_TOOLBAR);
+	image = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU);
   	gtk_container_add (GTK_CONTAINER (output_window->priv->close_button), image);
 	
 	g_signal_connect (output_window->priv->close_button, 
@@ -409,16 +418,15 @@
 	/* Create the copy button */
 	output_window->priv->copy_button = gtk_button_new ();
 	gtk_box_pack_start (GTK_BOX (vbox2), output_window->priv->copy_button, FALSE, FALSE, 0);
-  	gtk_widget_set_size_request (output_window->priv->copy_button, w + 2, h + 2);
 
 	gtk_tooltips_set_tip (output_window->priv->tooltips, 
 			      output_window->priv->copy_button, 
 			      _("Copy selected lines"), 
 			      NULL);
 
-	gtk_button_set_relief (GTK_BUTTON (output_window->priv->copy_button), GTK_RELIEF_NONE);
+	gedit_output_window_format_button (GTK_BUTTON (output_window->priv->copy_button), w, h);
 
-	image = gtk_image_new_from_stock ("gtk-copy", GTK_ICON_SIZE_SMALL_TOOLBAR);
+	image = gtk_image_new_from_stock ("gtk-copy", GTK_ICON_SIZE_MENU);
   	gtk_container_add (GTK_CONTAINER (output_window->priv->copy_button), image);
 
 	g_signal_connect (output_window->priv->copy_button, 
@@ -429,16 +437,15 @@
 	/* Create the clear button */
 	output_window->priv->clear_button = gtk_button_new ();
 	gtk_box_pack_start (GTK_BOX (vbox2), output_window->priv->clear_button, FALSE, FALSE, 0);
-	gtk_widget_set_size_request (output_window->priv->clear_button, w + 2, h + 2);
 	
 	gtk_tooltips_set_tip (output_window->priv->tooltips, 
 			      output_window->priv->clear_button, 
 			      _("Clear the output window"), 
 			      NULL);
 	
-	gtk_button_set_relief (GTK_BUTTON (output_window->priv->clear_button), GTK_RELIEF_NONE);
+	gedit_output_window_format_button (GTK_BUTTON (output_window->priv->clear_button), w, h);
 
-	image = gtk_image_new_from_stock ("gtk-clear", GTK_ICON_SIZE_SMALL_TOOLBAR);
+	image = gtk_image_new_from_stock ("gtk-clear", GTK_ICON_SIZE_MENU);
 	gtk_container_add (GTK_CONTAINER (output_window->priv->clear_button), image);
 
 	g_signal_connect (output_window->priv->clear_button, 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]