Use GTK's file open dialog also under Windows to have the extended options.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@927 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
3e9cbc0e01
commit
a8925aa73a
@ -1,6 +1,9 @@
|
|||||||
2006-10-24 Enrico Tröger <enrico.troeger@uvena.de>
|
2006-10-24 Enrico Tröger <enrico.troeger@uvena.de>
|
||||||
|
|
||||||
* src/build.c, src/socket.c: Fixed compiler warnings under Windows.
|
* src/build.c, src/socket.c: Fixed compiler warnings under Windows.
|
||||||
|
* win32-config.h, src/dialogs.c:
|
||||||
|
Use GTK's file open dialog also under Windows to have the extended
|
||||||
|
options(kept old dialog code for optional use).
|
||||||
|
|
||||||
|
|
||||||
2006-10-24 Nick Treleaven <nick.treleaven@btinternet.com>
|
2006-10-24 Nick Treleaven <nick.treleaven@btinternet.com>
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
#include "encodings.h"
|
#include "encodings.h"
|
||||||
|
|
||||||
|
|
||||||
#ifndef G_OS_WIN32
|
#ifndef USE_WIN32_DIALOG
|
||||||
static GtkWidget *add_file_open_extra_widget();
|
static GtkWidget *add_file_open_extra_widget();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ static GtkWidget *add_file_open_extra_widget();
|
|||||||
/* This shows the file selection dialog to open a file. */
|
/* This shows the file selection dialog to open a file. */
|
||||||
void dialogs_show_open_file ()
|
void dialogs_show_open_file ()
|
||||||
{
|
{
|
||||||
#ifdef G_OS_WIN32
|
#ifdef USE_WIN32_DIALOG
|
||||||
win32_show_file_dialog(TRUE);
|
win32_show_file_dialog(TRUE);
|
||||||
#else /* X11, not win32: use GTK_FILE_CHOOSER */
|
#else /* X11, not win32: use GTK_FILE_CHOOSER */
|
||||||
gchar *initdir;
|
gchar *initdir;
|
||||||
@ -154,7 +154,7 @@ void dialogs_show_open_file ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifndef G_OS_WIN32
|
#ifndef USE_WIN32_DIALOG
|
||||||
static GtkWidget *add_file_open_extra_widget()
|
static GtkWidget *add_file_open_extra_widget()
|
||||||
{
|
{
|
||||||
GtkWidget *vbox, *table, *file_entry, *check_hidden;
|
GtkWidget *vbox, *table, *file_entry, *check_hidden;
|
||||||
@ -217,6 +217,7 @@ static GtkWidget *add_file_open_extra_widget()
|
|||||||
// the ebox is for the tooltip, because gtk_combo_box can't show tooltips
|
// the ebox is for the tooltip, because gtk_combo_box can't show tooltips
|
||||||
filetype_ebox = gtk_event_box_new();
|
filetype_ebox = gtk_event_box_new();
|
||||||
filetype_combo = gtk_combo_box_new_text();
|
filetype_combo = gtk_combo_box_new_text();
|
||||||
|
gtk_combo_box_set_wrap_width(GTK_COMBO_BOX(filetype_combo), 2);
|
||||||
gtk_tooltips_set_tip(tooltips, filetype_ebox,
|
gtk_tooltips_set_tip(tooltips, filetype_ebox,
|
||||||
_("Explicitly defines a filetype for the file, if it would not be detected by filename extension.\nNote if you choose multiple files, they will all be opened with the chosen filetype."), NULL);
|
_("Explicitly defines a filetype for the file, if it would not be detected by filename extension.\nNote if you choose multiple files, they will all be opened with the chosen filetype."), NULL);
|
||||||
gtk_container_add(GTK_CONTAINER(filetype_ebox), filetype_combo);
|
gtk_container_add(GTK_CONTAINER(filetype_ebox), filetype_combo);
|
||||||
|
@ -323,3 +323,6 @@
|
|||||||
|
|
||||||
/* Define if you want to detect a running instance */
|
/* Define if you want to detect a running instance */
|
||||||
#define HAVE_SOCKET 1
|
#define HAVE_SOCKET 1
|
||||||
|
|
||||||
|
/* #define USE_WIN32_DIALOG 1 */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user