Set the correct parent window for the toolbar editor dialog (closes #2913334).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4503 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
c0a243c43d
commit
baccf0391e
@ -22,6 +22,9 @@
|
||||
* src/keyfile.c, src/msgwindow.c, src/msgwindow.h, src/ui_utils.h:
|
||||
Add preferences for hiding single tabs from the messages window
|
||||
(no GUI preferences yet, still to be implemented).
|
||||
* src/callbacks.c, src/prefs.c, src/toolbar.c, src/toolbar.h:
|
||||
Set the correct parent window for the toolbar editor
|
||||
dialog (closes #2913334).
|
||||
|
||||
|
||||
2009-12-20 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||
|
@ -2261,7 +2261,7 @@ void
|
||||
on_customize_toolbar1_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
{
|
||||
toolbar_configure();
|
||||
toolbar_configure(GTK_WINDOW(main_widgets.window));
|
||||
}
|
||||
|
||||
|
||||
@ -2269,7 +2269,7 @@ void
|
||||
on_button_customize_toolbar_clicked (GtkButton *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
toolbar_configure();
|
||||
toolbar_configure(GTK_WINDOW(ui_widgets.prefs_dialog));
|
||||
}
|
||||
|
||||
|
||||
|
@ -1535,10 +1535,14 @@ void prefs_show_dialog(void)
|
||||
GtkWidget *label;
|
||||
guint i;
|
||||
gchar *encoding_string;
|
||||
GdkPixbuf *pb;
|
||||
|
||||
ui_widgets.prefs_dialog = create_prefs_dialog();
|
||||
gtk_widget_set_name(ui_widgets.prefs_dialog, "GeanyPrefsDialog");
|
||||
gtk_window_set_transient_for(GTK_WINDOW(ui_widgets.prefs_dialog), GTK_WINDOW(main_widgets.window));
|
||||
pb = ui_new_pixbuf_from_inline(GEANY_IMAGE_LOGO);
|
||||
gtk_window_set_icon(GTK_WINDOW(ui_widgets.prefs_dialog), pb);
|
||||
g_object_unref(pb); /* free our reference */
|
||||
|
||||
/* init the default file encoding combo box */
|
||||
combo_new = ui_lookup_widget(ui_widgets.prefs_dialog, "combo_new_encoding");
|
||||
|
@ -882,7 +882,7 @@ static void tb_editor_available_items_deleted_cb(GtkTreeModel *model, GtkTreePat
|
||||
}
|
||||
|
||||
|
||||
static TBEditorWidget *tb_editor_create_dialog(void)
|
||||
static TBEditorWidget *tb_editor_create_dialog(GtkWindow *parent)
|
||||
{
|
||||
GtkWidget *dialog, *vbox, *hbox, *vbox_buttons, *button_add, *button_remove;
|
||||
GtkWidget *swin_available, *swin_used, *tree_available, *tree_used, *label;
|
||||
@ -890,8 +890,11 @@ static TBEditorWidget *tb_editor_create_dialog(void)
|
||||
GtkTreeViewColumn *column;
|
||||
TBEditorWidget *tbw = g_new(TBEditorWidget, 1);
|
||||
|
||||
if (parent == NULL)
|
||||
parent = GTK_WINDOW(main_widgets.window);
|
||||
|
||||
dialog = gtk_dialog_new_with_buttons(_("Customize Toolbar"),
|
||||
GTK_WINDOW(main_widgets.window),
|
||||
parent,
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL);
|
||||
vbox = ui_dialog_vbox_new(GTK_DIALOG(dialog));
|
||||
@ -1011,7 +1014,7 @@ static TBEditorWidget *tb_editor_create_dialog(void)
|
||||
}
|
||||
|
||||
|
||||
void toolbar_configure(void)
|
||||
void toolbar_configure(GtkWindow *parent)
|
||||
{
|
||||
gchar *markup;
|
||||
const gchar *name;
|
||||
@ -1030,7 +1033,7 @@ void toolbar_configure(void)
|
||||
all_items = gtk_action_group_list_actions(group);
|
||||
|
||||
/* create the GUI */
|
||||
tbw = tb_editor_create_dialog();
|
||||
tbw = tb_editor_create_dialog(parent);
|
||||
|
||||
/* fill the stores */
|
||||
gtk_list_store_insert_with_values(tbw->store_available, NULL, -1,
|
||||
|
@ -63,6 +63,6 @@ GtkWidget *toolbar_init(void);
|
||||
|
||||
void toolbar_finalize(void);
|
||||
|
||||
void toolbar_configure(void);
|
||||
void toolbar_configure(GtkWindow *parent);
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user