aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-04-06 01:53:30 +0800
committerChristian Persch <chpe@src.gnome.org>2004-04-06 01:53:30 +0800
commit893c58cbd97f46616c52d3ec3fa0b3df3f56f972 (patch)
tree252fead6cbee150eadf11282592ff797c4bf8b09
parent77f5531c6da1f2f9b395510bd05748f504b87b8b (diff)
downloadgsoc2013-epiphany-893c58cbd97f46616c52d3ec3fa0b3df3f56f972.tar
gsoc2013-epiphany-893c58cbd97f46616c52d3ec3fa0b3df3f56f972.tar.gz
gsoc2013-epiphany-893c58cbd97f46616c52d3ec3fa0b3df3f56f972.tar.bz2
gsoc2013-epiphany-893c58cbd97f46616c52d3ec3fa0b3df3f56f972.tar.lz
gsoc2013-epiphany-893c58cbd97f46616c52d3ec3fa0b3df3f56f972.tar.xz
gsoc2013-epiphany-893c58cbd97f46616c52d3ec3fa0b3df3f56f972.tar.zst
gsoc2013-epiphany-893c58cbd97f46616c52d3ec3fa0b3df3f56f972.zip
Make prefs, pdm and print setup dialogues transient to their parent. Fixes
2004-04-05 Christian Persch <chpe@cvs.gnome.org> * data/glade/prefs-dialog.glade: * lib/ephy-dialog.c: (ephy_dialog_get_parent): * lib/ephy-dialog.h: * src/prefs-dialog.c: (prefs_homepage_current_button_clicked_cb): * src/window-commands.c: (window_cmd_file_print_setup), (window_cmd_edit_personal_data), (window_cmd_edit_prefs): Make prefs, pdm and print setup dialogues transient to their parent. Fixes bug #139124.
-rw-r--r--ChangeLog12
-rw-r--r--data/glade/prefs-dialog.glade2
-rw-r--r--lib/ephy-dialog.c10
-rw-r--r--lib/ephy-dialog.h5
-rw-r--r--src/prefs-dialog.c10
-rw-r--r--src/window-commands.c3
6 files changed, 34 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 086cde86a..49fcf0cbd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2004-04-05 Christian Persch <chpe@cvs.gnome.org>
+
+ * data/glade/prefs-dialog.glade:
+ * lib/ephy-dialog.c: (ephy_dialog_get_parent):
+ * lib/ephy-dialog.h:
+ * src/prefs-dialog.c: (prefs_homepage_current_button_clicked_cb):
+ * src/window-commands.c: (window_cmd_file_print_setup),
+ (window_cmd_edit_personal_data), (window_cmd_edit_prefs):
+
+ Make prefs, pdm and print setup dialogues transient to their parent.
+ Fixes bug #139124.
+
2004-04-04 Adam Hooper <adamh@cvs.gnome.org>
* HACKING:
diff --git a/data/glade/prefs-dialog.glade b/data/glade/prefs-dialog.glade
index bfdd72397..8980fb16f 100644
--- a/data/glade/prefs-dialog.glade
+++ b/data/glade/prefs-dialog.glade
@@ -11,7 +11,7 @@
<property name="window_position">GTK_WIN_POS_CENTER</property>
<property name="modal">False</property>
<property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
+ <property name="destroy_with_parent">True</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
diff --git a/lib/ephy-dialog.c b/lib/ephy-dialog.c
index 5013281ef..c359d5274 100644
--- a/lib/ephy-dialog.c
+++ b/lib/ephy-dialog.c
@@ -1285,7 +1285,15 @@ ephy_dialog_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
-static void
+GtkWidget *
+ephy_dialog_get_parent (EphyDialog *dialog)
+{
+ g_return_val_if_fail (EPHY_IS_DIALOG (dialog), NULL);
+
+ return dialog->priv->parent;
+}
+
+void
ephy_dialog_set_parent (EphyDialog *dialog,
GtkWidget *parent)
{
diff --git a/lib/ephy-dialog.h b/lib/ephy-dialog.h
index 085f692cd..d1b28724d 100644
--- a/lib/ephy-dialog.h
+++ b/lib/ephy-dialog.h
@@ -110,6 +110,11 @@ void ephy_dialog_show (EphyDialog *dialog);
void ephy_dialog_hide (EphyDialog *dialog);
+void ephy_dialog_set_parent (EphyDialog *dialog,
+ GtkWidget *parent);
+
+GtkWidget *ephy_dialog_get_parent (EphyDialog *dialog);
+
void ephy_dialog_set_modal (EphyDialog *dialog,
gboolean is_modal);
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 1261c57f1..b47ae561f 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -1256,16 +1256,14 @@ void
prefs_homepage_current_button_clicked_cb (GtkWidget *button,
EphyDialog *dialog)
{
- EphySession *session;
- EphyWindow *window;
+ GtkWidget *parent;
EphyEmbed *embed;
char *location;
- session = EPHY_SESSION (ephy_shell_get_session (ephy_shell));
- window = ephy_session_get_active_window (session);
- g_return_if_fail (window != NULL);
+ parent = ephy_dialog_get_parent (dialog);
+ g_return_if_fail (parent != NULL);
- embed = ephy_window_get_active_embed (window);
+ embed = ephy_window_get_active_embed (EPHY_WINDOW (parent));
g_return_if_fail (embed != NULL);
location = ephy_embed_get_location (embed, TRUE);
diff --git a/src/window-commands.c b/src/window-commands.c
index f6618f985..af9d26ef2 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -76,6 +76,7 @@ window_cmd_file_print_setup (GtkAction *action,
EphyDialog *dialog;
dialog = EPHY_DIALOG (ephy_shell_get_print_setup_dialog (ephy_shell));
+ ephy_dialog_set_parent (dialog, GTK_WIDGET (window));
ephy_dialog_show (dialog);
}
@@ -785,6 +786,7 @@ window_cmd_edit_personal_data (GtkAction *action,
EphyDialog *dialog;
dialog = EPHY_DIALOG (ephy_shell_get_pdm_dialog (ephy_shell));
+ ephy_dialog_set_parent (dialog, GTK_WIDGET (window));
ephy_dialog_show (dialog);
}
@@ -796,6 +798,7 @@ window_cmd_edit_prefs (GtkAction *action,
EphyDialog *dialog;
dialog = EPHY_DIALOG (ephy_shell_get_prefs_dialog (ephy_shell));
+ ephy_dialog_set_parent (dialog, GTK_WIDGET (window));
ephy_dialog_show (dialog);
}