[gnome-commander] tabs: added notebook support to GnomeCmdFileSelector
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] tabs: added notebook support to GnomeCmdFileSelector
- Date: Sat, 5 Jun 2010 21:01:35 +0000 (UTC)
commit e332a740c31e85481496433927cc207a35d731bc
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Sat Jun 5 12:59:13 2010 +0200
tabs: added notebook support to GnomeCmdFileSelector
src/gnome-cmd-file-selector.h | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/src/gnome-cmd-file-selector.h b/src/gnome-cmd-file-selector.h
index 95fcbb9..5e65ef4 100644
--- a/src/gnome-cmd-file-selector.h
+++ b/src/gnome-cmd-file-selector.h
@@ -30,6 +30,7 @@ struct GnomeCmdMainWin;
#include "gnome-cmd-file-list.h"
#include "gnome-cmd-con.h"
#include "gnome-cmd-dir.h"
+#include "gnome-cmd-notebook.h"
typedef enum
@@ -52,13 +53,11 @@ struct GnomeCmdFileSelector
GtkWidget *con_hbox;
GtkWidget *dir_indicator;
GtkWidget *dir_label;
- GtkWidget *scrolledwindow;
GtkWidget *info_label;
GnomeCmdCombo *con_combo;
GtkWidget *vol_label;
- private:
-
+ GnomeCmdNotebook *notebook;
GnomeCmdFileList *list;
public:
@@ -71,7 +70,8 @@ struct GnomeCmdFileSelector
operator GtkWidget * () { return GTK_WIDGET (this); }
operator GtkBox * () { return GTK_BOX (this); }
- GnomeCmdFileList *&file_list() { return list; }
+ GnomeCmdFileList *file_list() const { return list; }
+ GnomeCmdFileList *file_list(gint n) const;
GnomeCmdDir *get_directory() { return file_list()->cwd; }
void goto_directory(const gchar *dir) { return file_list()->goto_directory(dir); }
@@ -92,6 +92,10 @@ struct GnomeCmdFileSelector
gboolean is_local() { return gnome_cmd_con_is_local (get_connection ()); }
gboolean is_active();
+ GtkWidget *new_tab(GnomeCmdDir *dir=NULL, gboolean activate=TRUE);
+ void close_tab() { if (notebook->size()>1) notebook->remove_page(); }
+ void close_tab(gint n) { if (notebook->size()>1) notebook->remove_page(n); }
+
void show_filter();
void update_files();
void update_direntry();
@@ -104,6 +108,11 @@ struct GnomeCmdFileSelector
gboolean key_pressed(GdkEventKey *event);
};
+inline GnomeCmdFileList *GnomeCmdFileSelector::file_list(gint n) const
+{
+ return (GnomeCmdFileList *) gtk_bin_get_child (GTK_BIN (notebook->page(n)));
+}
+
inline void GnomeCmdFileSelector::set_connection(GnomeCmdCon *con, GnomeCmdDir *start_dir)
{
file_list()->set_connection(con, start_dir);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]