[gnome-commander] Added signal "con-changed" (GnomeCmdFileList -> GnomeCmdFileSelector)
- From: Piotr Eljasiak <epiotr src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-commander] Added signal "con-changed" (GnomeCmdFileList -> GnomeCmdFileSelector)
- Date: Mon, 20 Jul 2009 21:02:30 +0000 (UTC)
commit 2cb153075a916b76491b33acdad9292b35fd4ee7
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Mon Jul 20 22:59:23 2009 +0200
Added signal "con-changed" (GnomeCmdFileList -> GnomeCmdFileSelector)
src/gnome-cmd-file-list.cc | 12 ++++++++++++
src/gnome-cmd-file-selector.cc | 9 +++++++++
2 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc
index f6dbaa5..37e9581 100644
--- a/src/gnome-cmd-file-list.cc
+++ b/src/gnome-cmd-file-list.cc
@@ -65,6 +65,7 @@ enum
EMPTY_SPACE_CLICKED, // The file list was clicked but not on a file
FILES_CHANGED, // The visible content of the file list has changed (files have been: selected, created, deleted or modified)
DIR_CHANGED, // The current directory has been changed
+ CON_CHANGED, // The current connection has been changed
LAST_SIGNAL
};
@@ -121,6 +122,7 @@ struct GnomeCmdFileListClass
void (* empty_space_clicked) (GnomeCmdFileList *fl, GdkEventButton *button);
void (* files_changed) (GnomeCmdFileList *fl);
void (* dir_changed) (GnomeCmdFileList *fl, GnomeCmdDir *dir);
+ void (* con_changed) (GnomeCmdFileList *fl, GnomeCmdCon *con);
};
@@ -1355,6 +1357,7 @@ static void gnome_cmd_file_list_class_init (GnomeCmdFileListClass *klass)
klass->list_clicked = NULL;
klass->files_changed = NULL;
klass->dir_changed = NULL;
+ klass->con_changed = NULL;
signals[FILE_CLICKED] =
g_signal_new ("file-clicked",
@@ -1416,6 +1419,15 @@ static void gnome_cmd_file_list_class_init (GnomeCmdFileListClass *klass)
G_TYPE_NONE,
1, G_TYPE_POINTER);
+ signals[CON_CHANGED] =
+ g_signal_new ("con-changed",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GnomeCmdFileListClass, con_changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE,
+ 1, G_TYPE_POINTER);
}
static void gnome_cmd_file_list_init (GnomeCmdFileList *fl)
diff --git a/src/gnome-cmd-file-selector.cc b/src/gnome-cmd-file-selector.cc
index 0917c98..ada53b8 100644
--- a/src/gnome-cmd-file-selector.cc
+++ b/src/gnome-cmd-file-selector.cc
@@ -951,6 +951,13 @@ static void on_list_files_changed (GnomeCmdFileList *fl, GnomeCmdFileSelector *f
}
+static void on_list_con_changed (GnomeCmdFileList *fl, GnomeCmdCon *con, GnomeCmdFileSelector *fs)
+{
+ fs->priv->dir_history = gnome_cmd_con_get_dir_history (con);
+ gnome_cmd_combo_select_data (GNOME_CMD_COMBO (fs->con_combo), con);
+}
+
+
static void on_list_dir_changed (GnomeCmdFileList *fl, GnomeCmdDir *dir, GnomeCmdFileSelector *fs)
{
if (fs->priv->dir_history && !fs->priv->dir_history->is_locked)
@@ -1262,6 +1269,8 @@ static void init (GnomeCmdFileSelector *fs)
g_signal_connect (fs->file_list(), "file-released", G_CALLBACK (on_list_file_released), fs);
g_signal_connect (fs->file_list(), "list-clicked", G_CALLBACK (on_list_list_clicked), fs);
g_signal_connect (fs->file_list(), "empty-space-clicked", G_CALLBACK (on_list_empty_space_clicked), fs);
+
+ g_signal_connect (fs->file_list(), "con-changed", G_CALLBACK (on_list_con_changed), fs);
g_signal_connect (fs->file_list(), "files-changed", G_CALLBACK (on_list_files_changed), fs);
g_signal_connect (fs->file_list(), "key-press-event", G_CALLBACK (on_list_key_pressed), fs);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]