summaryrefslogtreecommitdiff
path: root/pluma/pluma-file-chooser-dialog.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-11-06 14:43:26 +0300
committermonsta <[email protected]>2016-11-06 14:43:26 +0300
commit4c06cb5cd0859067769dac1317682d430b18cc78 (patch)
tree0c363ee71311366fb2016df9858858ef5ef2d25d /pluma/pluma-file-chooser-dialog.c
parent65371f53dbb06180b750dad7c19e7bcf0f8651d6 (diff)
downloadpluma-4c06cb5cd0859067769dac1317682d430b18cc78.tar.bz2
pluma-4c06cb5cd0859067769dac1317682d430b18cc78.tar.xz
move to GTK+3 (>= 3.14), drop GTK+2 code and --with-gtk build option
Diffstat (limited to 'pluma/pluma-file-chooser-dialog.c')
-rw-r--r--pluma/pluma-file-chooser-dialog.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/pluma/pluma-file-chooser-dialog.c b/pluma/pluma-file-chooser-dialog.c
index c480cc4e..f23a4c0a 100644
--- a/pluma/pluma-file-chooser-dialog.c
+++ b/pluma/pluma-file-chooser-dialog.c
@@ -39,9 +39,7 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
-#if GTK_CHECK_VERSION (3, 0, 0)
#include <gtksourceview/gtksource.h>
-#endif
#include "pluma-file-chooser-dialog.h"
#include "pluma-encodings-combo-box.h"
@@ -55,10 +53,6 @@
#define ALL_FILES _("All Files")
#define ALL_TEXT_FILES _("All Text Files")
-#if GTK_CHECK_VERSION (3, 0, 0)
-#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y)
-#endif
-
struct _PlumaFileChooserDialogPrivate
{
GtkWidget *option_menu;
@@ -216,7 +210,7 @@ create_newline_combo (PlumaFileChooserDialog *dialog)
static void
create_extra_widget (PlumaFileChooserDialog *dialog)
{
- dialog->priv->extra_widget = gtk_hbox_new (FALSE, 6);
+ dialog->priv->extra_widget = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_widget_show (dialog->priv->extra_widget);
@@ -309,11 +303,7 @@ all_text_files_filter (const GtkFileFilterInfo *filter_info,
GtkSourceLanguage *lang;
lang = gtk_source_language_manager_get_language (lm, *languages);
-#if GTK_CHECK_VERSION (3, 0, 0)
g_return_val_if_fail (GTK_SOURCE_IS_LANGUAGE (lang), FALSE);
-#else
- g_return_val_if_fail (GTK_IS_SOURCE_LANGUAGE (lang), FALSE);
-#endif
++languages;
mime_types = gtk_source_language_get_mime_types (lang);
@@ -392,9 +382,6 @@ pluma_file_chooser_dialog_new_valist (const gchar *title,
result = g_object_new (PLUMA_TYPE_FILE_CHOOSER_DIALOG,
"title", title,
-#if !GTK_CHECK_VERSION (3, 0, 0)
- "file-system-backend", NULL,
-#endif
"local-only", FALSE,
"action", action,
"select-multiple", action == GTK_FILE_CHOOSER_ACTION_OPEN,
@@ -421,9 +408,7 @@ pluma_file_chooser_dialog_new_valist (const gchar *title,
gtk_file_filter_set_name (filter, ALL_FILES);
gtk_file_filter_add_pattern (filter, "*");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (result), filter);
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_file_chooser_set_action (GTK_FILE_CHOOSER (result), action);
-#endif
if (active_filter != 1)
{