totem r5733 - in trunk: . src
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: totem r5733 - in trunk: . src
- Date: Mon, 29 Sep 2008 14:23:59 +0000 (UTC)
Author: hadess
Date: Mon Sep 29 14:23:59 2008
New Revision: 5733
URL: http://svn.gnome.org/viewvc/totem?rev=5733&view=rev
Log:
2008-09-29 Bastien Nocera <hadess hadess net>
* src/totem-sidebar.c (totem_sidebar_toggle),
(totem_sidebar_setup):
* src/totem.c (totem_callback_connect): Make the sidebar arrow
face right when closed, and face left when opened, showing the
movement the sidebar would take, place the arrow to the right
of the label (and vice-versa for RTL languages)
Modified:
trunk/ChangeLog
trunk/src/totem-sidebar.c
trunk/src/totem.c
Modified: trunk/src/totem-sidebar.c
==============================================================================
--- trunk/src/totem-sidebar.c (original)
+++ trunk/src/totem-sidebar.c Mon Sep 29 14:23:59 2008
@@ -60,6 +60,7 @@
totem_sidebar_toggle (Totem *totem, gboolean state)
{
GtkAction *action;
+ GtkWidget *box, *arrow;
if (GTK_WIDGET_VISIBLE (GTK_WIDGET (totem->sidebar)) == state)
return;
@@ -74,6 +75,10 @@
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), state);
totem_signal_unblock_by_data (G_OBJECT (action), totem);
+ box = GTK_WIDGET (gtk_builder_get_object (totem->xml, "tmw_sidebar_button_hbox"));
+ arrow = g_object_get_data (G_OBJECT (box), "arrow");
+ gtk_arrow_set (GTK_ARROW (arrow), state ? GTK_ARROW_LEFT : GTK_ARROW_RIGHT, GTK_SHADOW_NONE);
+
totem->sidebar_shown = state;
cb_resize(totem);
}
@@ -124,8 +129,15 @@
gtk_widget_show_all (totem->sidebar);
gtk_widget_realize (totem->sidebar);
- if (!visible)
+ if (!visible) {
gtk_widget_hide (totem->sidebar);
+ } else {
+ GtkWidget *box, *arrow;
+
+ box = GTK_WIDGET (gtk_builder_get_object (totem->xml, "tmw_sidebar_button_hbox"));
+ arrow = g_object_get_data (G_OBJECT (box), "arrow");
+ gtk_arrow_set (GTK_ARROW (arrow), GTK_ARROW_LEFT, GTK_SHADOW_NONE);
+ }
}
char *
Modified: trunk/src/totem.c
==============================================================================
--- trunk/src/totem.c (original)
+++ trunk/src/totem.c Mon Sep 29 14:23:59 2008
@@ -3169,7 +3169,8 @@
item = gtk_toggle_button_new ();
gtk_action_connect_proxy (action, item);
arrow = gtk_arrow_new (GTK_ARROW_RIGHT, GTK_SHADOW_NONE);
- gtk_widget_show (arrow);
+ g_object_set_data (G_OBJECT (box), "arrow", arrow);
+ gtk_button_set_image_position (GTK_BUTTON (item), GTK_POS_RIGHT);
gtk_button_set_image (GTK_BUTTON (item), arrow);
gtk_box_pack_start (box, item, FALSE, FALSE, 0);
g_signal_connect (G_OBJECT (item), "drag_data_received",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]