summaryrefslogtreecommitdiff
path: root/pluma/dialogs/pluma-search-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/dialogs/pluma-search-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/dialogs/pluma-search-dialog.c')
-rwxr-xr-xpluma/dialogs/pluma-search-dialog.c37
1 files changed, 1 insertions, 36 deletions
diff --git a/pluma/dialogs/pluma-search-dialog.c b/pluma/dialogs/pluma-search-dialog.c
index 8f846e25..329e1721 100755
--- a/pluma/dialogs/pluma-search-dialog.c
+++ b/pluma/dialogs/pluma-search-dialog.c
@@ -60,11 +60,7 @@ struct _PlumaSearchDialogPrivate
{
gboolean show_replace;
-#if GTK_CHECK_VERSION (3, 0, 0)
GtkWidget *grid;
-#else
- GtkWidget *table;
-#endif
GtkWidget *search_label;
GtkWidget *search_entry;
GtkWidget *search_text_entry;
@@ -301,10 +297,6 @@ show_replace_widgets (PlumaSearchDialog *dlg,
gtk_widget_show (dlg->priv->replace_all_button);
gtk_widget_show (dlg->priv->replace_button);
-#if !GTK_CHECK_VERSION (3, 0, 0)
- gtk_table_set_row_spacings (GTK_TABLE (dlg->priv->table), 12);
-#endif
-
gtk_window_set_title (GTK_WINDOW (dlg), _("Replace"));
}
else
@@ -314,10 +306,6 @@ show_replace_widgets (PlumaSearchDialog *dlg,
gtk_widget_hide (dlg->priv->replace_all_button);
gtk_widget_hide (dlg->priv->replace_button);
-#if !GTK_CHECK_VERSION (3, 0, 0)
- gtk_table_set_row_spacings (GTK_TABLE (dlg->priv->table), 0);
-#endif
-
gtk_window_set_title (GTK_WINDOW (dlg), _("Find"));
}
@@ -354,20 +342,13 @@ pluma_search_dialog_init (PlumaSearchDialog *dlg)
gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_action_area (GTK_DIALOG (dlg))),
6);
-#if GTK_CHECK_VERSION (3, 0, 0)
- file = pluma_dirs_get_ui_file ("pluma-search-dialog-gtk3.ui");
-#else
file = pluma_dirs_get_ui_file ("pluma-search-dialog.ui");
-#endif
+
ret = pluma_utils_get_ui_objects (file,
root_objects,
&error_widget,
"search_dialog_content", &content,
-#if GTK_CHECK_VERSION (3, 0, 0)
"grid", &dlg->priv->grid,
-#else
- "table", &dlg->priv->table,
-#endif
"search_label", &dlg->priv->search_label,
"replace_with_label", &dlg->priv->replace_label,
"match_case_checkbutton", &dlg->priv->match_case_checkbutton,
@@ -400,24 +381,16 @@ pluma_search_dialog_init (PlumaSearchDialog *dlg)
(PLUMA_HISTORY_ENTRY (dlg->priv->search_entry),
(PlumaHistoryEntryEscapeFunc) pluma_utils_escape_search_text);
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_set_hexpand (GTK_WIDGET (dlg->priv->search_entry), TRUE);
-#endif
dlg->priv->search_text_entry = pluma_history_entry_get_entry
(PLUMA_HISTORY_ENTRY (dlg->priv->search_entry));
gtk_entry_set_activates_default (GTK_ENTRY (dlg->priv->search_text_entry),
TRUE);
gtk_widget_show (dlg->priv->search_entry);
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_grid_attach_next_to (GTK_GRID (dlg->priv->grid),
dlg->priv->search_entry,
dlg->priv->search_label,
GTK_POS_RIGHT, 1, 1);
-#else
- gtk_table_attach_defaults (GTK_TABLE (dlg->priv->table),
- dlg->priv->search_entry,
- 1, 2, 0, 1);
-#endif
dlg->priv->replace_entry = pluma_history_entry_new ("history-replace-with",
TRUE);
@@ -425,24 +398,16 @@ pluma_search_dialog_init (PlumaSearchDialog *dlg)
(PLUMA_HISTORY_ENTRY (dlg->priv->replace_entry),
(PlumaHistoryEntryEscapeFunc) pluma_utils_escape_search_text);
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_set_hexpand (GTK_WIDGET (dlg->priv->replace_entry), TRUE);
-#endif
dlg->priv->replace_text_entry = pluma_history_entry_get_entry
(PLUMA_HISTORY_ENTRY (dlg->priv->replace_entry));
gtk_entry_set_activates_default (GTK_ENTRY (dlg->priv->replace_text_entry),
TRUE);
gtk_widget_show (dlg->priv->replace_entry);
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_grid_attach_next_to (GTK_GRID (dlg->priv->grid),
dlg->priv->replace_entry,
dlg->priv->replace_label,
GTK_POS_RIGHT, 1, 1);
-#else
- gtk_table_attach_defaults (GTK_TABLE (dlg->priv->table),
- dlg->priv->replace_entry,
- 1, 2, 1, 2);
-#endif
gtk_label_set_mnemonic_widget (GTK_LABEL (dlg->priv->search_label),
dlg->priv->search_entry);