Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
techee committed Jun 8, 2024
1 parent 3ceac7a commit d902152
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions projectorganizer/src/prjorg-sidebar.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,19 +427,19 @@ void on_open_terminal(G_GNUC_UNUSED GtkMenuItem * menuitem, G_GNUC_UNUSED gpoint

static gint file_chooser_run(GtkFileChooser *dialog)
{
if (GTK_IS_WIDGET(dialog))
if (GTK_IS_NATIVE_DIALOG(dialog))
return gtk_native_dialog_run(GTK_NATIVE_DIALOG(dialog));
else
return gtk_dialog_run(GTK_DIALOG(dialog));

return gtk_native_dialog_run(GTK_NATIVE_DIALOG(dialog));
}


static void file_chooser_destroy(GtkFileChooser *dialog)
{
if (GTK_IS_WIDGET(dialog))
gtk_widget_destroy(GTK_WIDGET(dialog));
else
if (GTK_IS_NATIVE_DIALOG(dialog))
g_object_unref(dialog);
else
gtk_widget_destroy(GTK_WIDGET(dialog));
}


Expand All @@ -452,12 +452,12 @@ static void on_add_external(G_GNUC_UNUSED GtkMenuItem * menuitem, G_GNUC_UNUSED
if (geany_data->interface_prefs->use_native_windows_dialogs)
dialog = GTK_FILE_CHOOSER(gtk_file_chooser_native_new(_("Add External Directory"),
GTK_WINDOW(geany_data->main_widgets->window),
GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, _("_Add"), _("_Cancel")));
GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, _("_Add"), NULL));
else
dialog = GTK_FILE_CHOOSER(gtk_file_chooser_dialog_new(_("Add External Directory"),
GTK_WINDOW(geany->main_widgets->window), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
_("_Cancel"), GTK_RESPONSE_CANCEL,
_("Add"), GTK_RESPONSE_ACCEPT, NULL));
_("_Add"), GTK_RESPONSE_ACCEPT, NULL));

gtk_file_chooser_set_current_folder(dialog, locale_path);

Expand Down

0 comments on commit d902152

Please sign in to comment.