Skip to content

Commit

Permalink
Fixed a deprecated message of gtk_window_get_transient_for().
Browse files Browse the repository at this point in the history
Fixed "GtkDialog mapped without a transient parent. ..."
Fixed the size of ContentsDialog.
https://git.gnome.org/browse/gtk+/commit/?id=c4ec89cf9d
  • Loading branch information
fujiwarat committed Aug 29, 2014
1 parent 7b90fd0 commit a552ed1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
32 changes: 13 additions & 19 deletions input-pad/dialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -253,41 +253,35 @@ Bin</property>
</object>
</child>
</object>
<object class="GtkDialog" id="ContentsDialog">
<object class="GtkMessageDialog" id="ContentsDialog">
<property name="title" translatable="yes">Input Pad Troubleshoot</property>
<!-- property name="transient-for">TopWindow</property -->
<child internal-child="vbox">
<object class="GtkBox" id="vbox2">
<property name="orientation">vertical</property>
<property name="border-width">10</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="wrap_mode">word-char</property>
<property name="wrap">True</property>
<property name="label" translatable="yes">
<property name="text" translatable="yes">
This application can be run either as a stand-alone program or under an input method application.
If you wish to send multi-byte characters, this application needs to be run under an input method application.
If you wish to send characters to X11 applications, those applications needs to allow send events. e.g.
% xterm -xrm "XTerm*allowSendEvents: true"

You also can copy pad files from /usr/share/input-pad/pad to $HOME/.config/pad to customize those in "Custom Character" pane.</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<!-- property name="transient-for">TopWindow</property -->
<child internal-child="vbox">
<object class="GtkBox" id="vbox2">
<property name="orientation">vertical</property>
<property name="border-width">10</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="hbuttonbox2">
<property name="orientation">horizontal</property>
<property name="border-width">20</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="ContentsOKButton">
<property name="visible">True</property>
<property name="label" translatable="yes">_OK</property>
<property name="use-underline">TRUE</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
Expand Down
5 changes: 5 additions & 0 deletions input-pad/window-gtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,9 @@ static void
on_button_config_layouts_clicked (GtkButton *button, gpointer data)
{
GtkWidget *dlg = GTK_WIDGET (data);
GtkWidget *top_window = gtk_widget_get_toplevel (GTK_WIDGET (button));

gtk_window_set_transient_for (GTK_WINDOW (dlg), GTK_WINDOW (top_window));
gtk_dialog_run (GTK_DIALOG (dlg));
gtk_widget_hide (dlg);
}
Expand Down Expand Up @@ -5105,6 +5107,7 @@ on_code_point_activate (GSimpleAction *action,
GtkBuilder *builder = app->builder;
GtkWidget *dlg = GTK_WIDGET (gtk_builder_get_object (builder,
"CodePointDialog"));
gtk_window_set_transient_for (GTK_WINDOW (dlg), GTK_WINDOW (app->window));

gtk_dialog_run (GTK_DIALOG (dlg));
gtk_widget_hide (dlg);
Expand Down Expand Up @@ -5217,6 +5220,7 @@ on_contents_activate (GSimpleAction *action,
GtkBuilder *builder = app->builder;
GtkWidget *dlg = GTK_WIDGET (gtk_builder_get_object (builder,
"ContentsDialog"));
gtk_window_set_transient_for (GTK_WINDOW (dlg), GTK_WINDOW (app->window));

gtk_dialog_run (GTK_DIALOG (dlg));
gtk_widget_hide (dlg);
Expand All @@ -5231,6 +5235,7 @@ on_about_activate (GSimpleAction *action,
GtkBuilder *builder = app->builder;
GtkWidget *dlg = GTK_WIDGET (gtk_builder_get_object (builder,
"AboutDialog"));
gtk_window_set_transient_for (GTK_WINDOW (dlg), GTK_WINDOW (app->window));

/* Do not use GtkBuilder because gtk_about_dialog_set_logo_icon_name()
* sets the best_size as 0 for pixmaps dir.
Expand Down

0 comments on commit a552ed1

Please sign in to comment.