summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2005-01-06 17:35:14 +0000
committerBastien Nocera <hadess@src.gnome.org>2005-01-06 17:35:14 +0000
commit12afcf1157b3e5152327a68f91460fbf21f994ac (patch)
tree2beeba690d5fe14b1411dc4171076406b361b159
parentcc06ae14402f2438983dd312324021098fde4918 (diff)
downloadtotem-12afcf1157b3e5152327a68f91460fbf21f994ac.tar.gz
remove hide_prefs, use gtk_widget_hide directly instead, replace
2005-01-06 Bastien Nocera <hadess@hadess.net> * src/totem-preferences.c: (totem_setup_preferences): remove hide_prefs, use gtk_widget_hide directly instead, replace hard-coded /apps/totem by GCONF_PREFIX, * src/totem.c: (show_controls), (totem_setup_window): when setting up the window, take into account the vbox border for the width and height, replace hard-coded border width of 1 by a #define
-rw-r--r--ChangeLog9
-rw-r--r--src/totem-preferences.c23
-rw-r--r--src/totem.c8
3 files changed, 25 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 56c8ac620..feb3aa143 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-01-06 Bastien Nocera <hadess@hadess.net>
+
+ * src/totem-preferences.c: (totem_setup_preferences): remove
+ hide_prefs, use gtk_widget_hide directly instead, replace hard-coded
+ /apps/totem by GCONF_PREFIX,
+ * src/totem.c: (show_controls), (totem_setup_window):
+ when setting up the window, take into account the vbox border for the
+ width and height, replace hard-coded border width of 1 by a #define
+
2005-01-06 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* src/Makefile.am:
diff --git a/src/totem-preferences.c b/src/totem-preferences.c
index e490e1c36..96c2c8d02 100644
--- a/src/totem-preferences.c
+++ b/src/totem-preferences.c
@@ -63,12 +63,6 @@ totem_action_info (char *reason, Totem *totem)
gtk_widget_show (error_dialog);
}
-static void
-hide_prefs (GtkWidget *widget, int trash, Totem *totem)
-{
- gtk_widget_hide (totem->prefs);
-}
-
static gboolean
ask_show_visuals (Totem *totem)
{
@@ -445,7 +439,7 @@ totem_setup_preferences (Totem *totem)
is_local = totem_display_is_local ();
- gconf_client_add_dir (totem->gc, "/apps/totem",
+ gconf_client_add_dir (totem->gc, GCONF_PREFIX,
GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
gconf_client_notify_add (totem->gc, GCONF_PREFIX"/auto_resize",
(GConfClientNotifyFunc) auto_resize_changed_cb,
@@ -457,12 +451,13 @@ totem_setup_preferences (Totem *totem)
(GConfClientNotifyFunc) mediadev_changed_cb,
totem, NULL, NULL);
- totem->prefs = glade_xml_get_widget (totem->xml, "totem_preferences_window");
+ totem->prefs = glade_xml_get_widget (totem->xml,
+ "totem_preferences_window");
- g_signal_connect (G_OBJECT (totem->prefs),
- "response", G_CALLBACK (hide_prefs), (gpointer) totem);
+ g_signal_connect (G_OBJECT (totem->prefs), "response",
+ G_CALLBACK (gtk_widget_hide), NULL);
g_signal_connect (G_OBJECT (totem->prefs), "delete-event",
- G_CALLBACK (hide_prefs), (gpointer) totem);
+ G_CALLBACK (gtk_widget_hide), NULL);
/* Auto-resize */
auto_resize = gconf_client_get_bool (totem->gc,
@@ -481,7 +476,8 @@ totem_setup_preferences (Totem *totem)
if (mediadev == NULL || (strcmp (mediadev, "") == 0)
|| (strcmp (mediadev, "auto") == 0))
{
- mediadev = g_strdup (nautilus_burn_drive_selection_get_default_device
+ mediadev = g_strdup
+ (nautilus_burn_drive_selection_get_default_device
(NAUTILUS_BURN_DRIVE_SELECTION (item)));
gconf_client_set_string (totem->gc, GCONF_PREFIX"/mediadev",
mediadev, NULL);
@@ -492,7 +488,8 @@ totem_setup_preferences (Totem *totem)
g_signal_connect (G_OBJECT (item), "device-changed",
G_CALLBACK (on_combo_entry1_changed), totem);
- nautilus_burn_drive_selection_set_device (NAUTILUS_BURN_DRIVE_SELECTION (item), mediadev);
+ nautilus_burn_drive_selection_set_device
+ (NAUTILUS_BURN_DRIVE_SELECTION (item), mediadev);
g_free (mediadev);
/* Connection Speed */
diff --git a/src/totem.c b/src/totem.c
index 3d4fe45c2..f5cfa5965 100644
--- a/src/totem.c
+++ b/src/totem.c
@@ -77,6 +77,8 @@
#define ZOOM_IN_OFFSET 1
#define ZOOM_OUT_OFFSET -1
+#define BVW_VBOX_BORDER_WIDTH 1
+
static const GtkTargetEntry target_table[] = {
{ "text/uri-list", 0, 0 },
{ "_NETSCAPE_URL", 0, 1 },
@@ -1801,7 +1803,8 @@ show_controls (Totem *totem, gboolean was_fullscreen)
gtk_widget_show (controlbar);
gtk_widget_show (statusbar);
gtk_widget_hide (item);
- gtk_container_set_border_width (GTK_CONTAINER (bvw_vbox), 1);
+ gtk_container_set_border_width (GTK_CONTAINER (bvw_vbox),
+ BVW_VBOX_BORDER_WIDTH);
if (was_fullscreen == FALSE)
{
@@ -2855,7 +2858,8 @@ totem_setup_window (Totem *totem)
return;
item = glade_xml_get_widget (totem->xml, "tmw_bvw_vbox");
- gtk_widget_set_size_request (item, w, h);
+ gtk_widget_set_size_request (item,
+ w + BVW_VBOX_BORDER_WIDTH, h + BVW_VBOX_BORDER_WIDTH);
}
static void