diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2013-03-01 14:14:44 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2013-03-01 14:14:44 (GMT) |
commit | e398035b1634ff55247a366e862c15965e7945bc (patch) | |
tree | a805c08065ddb91706e33883143d97958d5a58f4 /src/gui/panels | |
parent | 80a2bc2ab0f8f831a45bba4bbbbad4b15cbf0645 (diff) |
Hidden the welcome panel when binaries get loaded.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@343 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/gui/panels')
-rw-r--r-- | src/gui/panels/panel.c | 62 |
1 files changed, 60 insertions, 2 deletions
diff --git a/src/gui/panels/panel.c b/src/gui/panels/panel.c index 2749545..6ccf14a 100644 --- a/src/gui/panels/panel.c +++ b/src/gui/panels/panel.c @@ -50,6 +50,7 @@ static GCallback _handler; static gpointer _data; /* Liste des panneaux en place. */ +static GPanelItem *_welcome = NULL; static GPanelItem *_panels_list = NULL; @@ -111,6 +112,15 @@ static void set_panel_node_size_request(const panel_node *, const GtkRequisition + +/* Surveille les ajouts dans la partie principale. */ +static void on_docking_to_main_panel(GtkDockStation *, GtkWidget *, gpointer); + + + + + + /* Indique le type défini pour un élément destiné à un panneau. */ G_DEFINE_TYPE(GPanelItem, g_panel_item, G_TYPE_EDITOR_ITEM); @@ -352,8 +362,11 @@ void load_main_panels(GObject *ref) { GPanelItem *item; /* Panneau de base à charger */ - item = create_welcome_panel(ref); - g_panel_item_dock(item); + _welcome = create_welcome_panel(ref); + g_panel_item_dock(_welcome); + + g_signal_connect(_nodes->station, "dock-widget", + G_CALLBACK(on_docking_to_main_panel), NULL); item = create_log_panel(ref); g_panel_item_dock(item); @@ -370,6 +383,7 @@ void load_main_panels(GObject *ref) } + /* ---------------------------------------------------------------------------------- */ /* MECANISMES DE PLACEMENT DES PANNEAUX */ /* ---------------------------------------------------------------------------------- */ @@ -1033,3 +1047,47 @@ static void set_panel_node_size_request(const panel_node *node, const GtkRequisi set_panel_node_size_request(node->second, ALLOC_2_REQ(&allocation)); } + + + + + +/* ---------------------------------------------------------------------------------- */ +/* MECANISMES DE PLACEMENT DES PANNEAUX */ +/* ---------------------------------------------------------------------------------- */ + + + + + +/****************************************************************************** +* * +* Paramètres : station = base d'accueil pour composants divers. * +* widget = composant rajouté à l'ensemble. * +* data = adresse non utilisée ici. * +* * +* Description : Surveille les ajouts dans la partie principale. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +static void on_docking_to_main_panel(GtkDockStation *station, GtkWidget *widget, gpointer data) +{ + + + printf("docking.... %p\n", widget); + + + g_panel_item_undock(_welcome); + + + + g_signal_handlers_disconnect_by_func(station, + G_CALLBACK(on_docking_to_main_panel), NULL); + + +} + |