[gnome-commander] Drop some unused code
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Drop some unused code
- Date: Sun, 15 May 2011 12:02:01 +0000 (UTC)
commit 61373e023c42087c0caeb21b61bb4e07f6628980
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Sun May 15 13:48:39 2011 +0200
Drop some unused code
libgcmd/gnome-cmd-dialog.cc | 9 ---------
libgcmd/gnome-cmd-dialog.h | 2 --
src/dialogs/gnome-cmd-search-dialog.cc | 4 ++--
src/gnome-cmd-patternsel-dialog.cc | 2 +-
4 files changed, 3 insertions(+), 14 deletions(-)
---
diff --git a/libgcmd/gnome-cmd-dialog.cc b/libgcmd/gnome-cmd-dialog.cc
index 3c4c91d..ba22966 100644
--- a/libgcmd/gnome-cmd-dialog.cc
+++ b/libgcmd/gnome-cmd-dialog.cc
@@ -197,12 +197,3 @@ void gnome_cmd_dialog_add_expanding_category (GnomeCmdDialog *dialog, GtkWidget
gtk_box_pack_start (GTK_BOX (dialog->priv->content), category, TRUE, TRUE, 0);
}
-
-
-void gnome_cmd_dialog_editable_enters (GnomeCmdDialog *dialog, GtkEditable *editable)
-{
- g_return_if_fail (GNOME_CMD_IS_DIALOG (dialog));
- g_return_if_fail (GTK_IS_EDITABLE (editable));
-
- g_signal_connect_swapped(editable, "activate", G_CALLBACK(gtk_window_activate_default), dialog);
-}
diff --git a/libgcmd/gnome-cmd-dialog.h b/libgcmd/gnome-cmd-dialog.h
index cc07701..3f54754 100644
--- a/libgcmd/gnome-cmd-dialog.h
+++ b/libgcmd/gnome-cmd-dialog.h
@@ -63,8 +63,6 @@ void gnome_cmd_dialog_add_category (GnomeCmdDialog *dialog, GtkWidget *category)
void gnome_cmd_dialog_add_expanding_category (GnomeCmdDialog *dialog, GtkWidget *category);
-void gnome_cmd_dialog_editable_enters (GnomeCmdDialog *dialog, GtkEditable *editable);
-
inline void gnome_cmd_dialog_set_transient_for (GnomeCmdDialog *dialog, GtkWindow *win)
{
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (win));
diff --git a/src/dialogs/gnome-cmd-search-dialog.cc b/src/dialogs/gnome-cmd-search-dialog.cc
index cec03ad..77b61fa 100755
--- a/src/dialogs/gnome-cmd-search-dialog.cc
+++ b/src/dialogs/gnome-cmd-search-dialog.cc
@@ -776,7 +776,7 @@ static void gnome_cmd_search_dialog_init (GnomeCmdSearchDialog *dialog)
g_list_foreach (defaults.name_patterns.ents, (GFunc) combo_box_insert_text, dialog->priv->pattern_combo);
gtk_combo_box_set_active (GTK_COMBO_BOX (dialog->priv->pattern_combo), 0);
- gnome_cmd_dialog_editable_enters (GNOME_CMD_DIALOG (dialog), GTK_EDITABLE (gtk_bin_get_child (GTK_BIN (dialog->priv->pattern_combo))));
+ g_signal_connect_swapped (gtk_bin_get_child (GTK_BIN (dialog->priv->pattern_combo)), "activate", G_CALLBACK (gtk_window_activate_default), dialog);
// search in
@@ -818,7 +818,7 @@ static void gnome_cmd_search_dialog_init (GnomeCmdSearchDialog *dialog)
g_list_foreach (defaults.content_patterns.ents, (GFunc) combo_box_insert_text, dialog->priv->find_text_combo);
gtk_combo_box_set_active (GTK_COMBO_BOX (dialog->priv->find_text_combo), 0);
- gnome_cmd_dialog_editable_enters (GNOME_CMD_DIALOG (dialog), GTK_EDITABLE (gtk_bin_get_child (GTK_BIN (dialog->priv->find_text_combo))));
+ g_signal_connect_swapped (gtk_bin_get_child (GTK_BIN (dialog->priv->find_text_combo)), "activate", G_CALLBACK (gtk_window_activate_default), dialog);
// case check
dialog->priv->case_check = create_check_with_mnemonic (window, _("Case sensiti_ve"), "case_check");
diff --git a/src/gnome-cmd-patternsel-dialog.cc b/src/gnome-cmd-patternsel-dialog.cc
index 6664d09..7e17ad8 100644
--- a/src/gnome-cmd-patternsel-dialog.cc
+++ b/src/gnome-cmd-patternsel-dialog.cc
@@ -104,7 +104,7 @@ static void gnome_cmd_patternsel_dialog_init (GnomeCmdPatternselDialog *dialog)
if (!defaults.name_patterns.empty())
gtk_combo_set_popdown_strings (GTK_COMBO (dialog->priv->pattern_combo), defaults.name_patterns.ents);
dialog->priv->pattern_entry = GTK_COMBO (dialog->priv->pattern_combo)->entry;
- gnome_cmd_dialog_editable_enters (GNOME_CMD_DIALOG (dialog), GTK_EDITABLE (dialog->priv->pattern_entry));
+ g_signal_connect_swapped (dialog->priv->pattern_entry, "activate", G_CALLBACK (gtk_window_activate_default), dialog);
gtk_entry_select_region (GTK_ENTRY (dialog->priv->pattern_entry), 0, -1);
label = create_label_with_mnemonic (GTK_WIDGET (dialog), _("_Pattern:"), dialog->priv->pattern_entry);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]