[totem] main: Remove unparented dialogue
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] main: Remove unparented dialogue
- Date: Sat, 26 Feb 2011 01:56:18 +0000 (UTC)
commit 74d27d3ac8c449530493a08f4dcdd5635156793a
Author: Bastien Nocera <hadess hadess net>
Date: Sat Feb 26 01:55:29 2011 +0000
main: Remove unparented dialogue
And some obsolete code checking for Totem running across
a network, that just won't work with an HD video...
https://bugzilla.gnome.org/show_bug.cgi?id=643239
src/backend/video-utils.c | 34 ----------------------------------
src/backend/video-utils.h | 2 --
src/totem-preferences.c | 41 +----------------------------------------
3 files changed, 1 insertions(+), 76 deletions(-)
---
diff --git a/src/backend/video-utils.c b/src/backend/video-utils.c
index 2b17abf..1b6c145 100644
--- a/src/backend/video-utils.c
+++ b/src/backend/video-utils.c
@@ -68,40 +68,6 @@ totem_gdk_window_set_waiting_cursor (GdkWindow *window)
gdk_flush ();
}
-gboolean
-totem_display_is_local (void)
-{
- const char *name, *work;
- int display, screen;
- gboolean has_hostname;
-
- name = gdk_display_get_name (gdk_display_get_default ());
- if (name == NULL)
- return TRUE;
-
- work = strstr (name, ":");
- if (work == NULL)
- return TRUE;
-
- has_hostname = (work - name) > 0;
-
- /* Get to the character after the colon */
- work++;
- if (*work == '\0')
- return TRUE;
-
- if (sscanf (work, "%d.%d", &display, &screen) != 2)
- return TRUE;
-
- if (has_hostname == FALSE)
- return TRUE;
-
- if (display < 10)
- return TRUE;
-
- return FALSE;
-}
-
char *
totem_time_to_string (gint64 msecs)
{
diff --git a/src/backend/video-utils.h b/src/backend/video-utils.h
index dc924cc..3080af5 100644
--- a/src/backend/video-utils.h
+++ b/src/backend/video-utils.h
@@ -31,8 +31,6 @@
void totem_gdk_window_set_invisible_cursor (GdkWindow *window);
void totem_gdk_window_set_waiting_cursor (GdkWindow *window);
-gboolean totem_display_is_local (void);
-
char *totem_time_to_string (gint64 msecs);
gint64 totem_string_to_time (const char *time_string);
char *totem_time_to_string_text (gint64 msecs);
diff --git a/src/totem-preferences.c b/src/totem-preferences.c
index 70d1a79..eba0657 100644
--- a/src/totem-preferences.c
+++ b/src/totem-preferences.c
@@ -52,31 +52,6 @@ G_MODULE_EXPORT void tpw_color_reset_clicked_cb (GtkButton *button, Totem *totem
G_MODULE_EXPORT void font_set_cb (GtkFontButton * fb, Totem * totem);
G_MODULE_EXPORT void encoding_set_cb (GtkComboBox *cb, Totem *totem);
-static gboolean
-ask_show_visuals (Totem *totem)
-{
- GtkWidget *dialog;
- int answer;
-
- dialog =
- gtk_message_dialog_new (NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_YES_NO,
- _("Enable visual effects?"));
- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
- _("It seems you are running Totem remotely.\n"
- "Are you sure you want to enable the visual "
- "effects?"));
- gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_dialog_set_default_response (GTK_DIALOG (dialog),
- GTK_RESPONSE_NO);
- answer = gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
-
- return (answer == GTK_RESPONSE_YES ? TRUE : FALSE);
-}
-
static void
totem_prefs_set_show_visuals (Totem *totem, gboolean value)
{
@@ -105,17 +80,6 @@ checkbutton2_toggled_cb (GtkToggleButton *togglebutton, Totem *totem)
gboolean value;
value = gtk_toggle_button_get_active (togglebutton);
-
- if (value != FALSE && totem_display_is_local () == FALSE)
- {
- if (ask_show_visuals (totem) == FALSE)
- {
- g_settings_set_boolean (totem->settings, "show-visualizations", FALSE);
- gtk_toggle_button_set_active (togglebutton, FALSE);
- return;
- }
- }
-
totem_prefs_set_show_visuals (totem, value);
}
@@ -302,7 +266,7 @@ void
totem_setup_preferences (Totem *totem)
{
GtkWidget *menu, *content_area, *bvw;
- gboolean show_visuals, is_local, lock_screensaver_on_audio;
+ gboolean show_visuals, lock_screensaver_on_audio;
guint i, hidden;
char *visual, *font, *encoding;
GList *list, *l;
@@ -323,7 +287,6 @@ totem_setup_preferences (Totem *totem)
g_return_if_fail (totem->settings != NULL);
- is_local = totem_display_is_local ();
bvw = totem_get_video_widget (totem);
/* Work-around builder dialogue not parenting properly for
@@ -385,8 +348,6 @@ totem_setup_preferences (Totem *totem)
/* Enable visuals */
item = gtk_builder_get_object (totem->xml, "tpw_visuals_checkbutton");
show_visuals = g_settings_get_boolean (totem->settings, "show-visualizations");
- if (is_local == FALSE && show_visuals != FALSE)
- show_visuals = ask_show_visuals (totem);
g_signal_handlers_disconnect_by_func (item, checkbutton2_toggled_cb, totem);
gtk_toggle_button_set_active
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]