summaryrefslogtreecommitdiff
path: root/src/gui/panels/bookmarks.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-06-04 00:27:13 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-06-04 00:27:13 (GMT)
commita7f73441a0d466824798a421f369628db0184030 (patch)
tree762b100af90b94f71597436fbd6d2349dcde7b42 /src/gui/panels/bookmarks.c
parent0d10ebabd650128271650ca03d6e0b0ac9facc5c (diff)
Loaded the biggest panel contents using threads.
Diffstat (limited to 'src/gui/panels/bookmarks.c')
-rw-r--r--src/gui/panels/bookmarks.c55
1 files changed, 15 insertions, 40 deletions
diff --git a/src/gui/panels/bookmarks.c b/src/gui/panels/bookmarks.c
index b7d0bc3..104e519 100644
--- a/src/gui/panels/bookmarks.c
+++ b/src/gui/panels/bookmarks.c
@@ -41,6 +41,7 @@
#include "../../common/cpp.h"
#include "../../common/extstr.h"
#include "../../core/params.h"
+#include "../../core/queue.h"
#include "../../glibext/chrysamarshal.h"
#include "../../glibext/signal.h"
#include "../../gtkext/easygtk.h"
@@ -99,9 +100,6 @@ static void g_bookmarks_panel_class_init(GBookmarksPanelClass *);
/* Initialise une instance de panneau de paramètres de config. */
static void g_bookmarks_panel_init(GBookmarksPanel *);
-/* Procède à l'initialisation de l'interface de rassemblement. */
-static void g_bookmarks_panel_dockable_interface_init(GtkDockableInterface *);
-
/* Supprime toutes les références externes. */
static void g_bookmarks_panel_dispose(GBookmarksPanel *);
@@ -145,7 +143,7 @@ static void on_param_value_edited(GtkCellRendererText *, gchar *, gchar *, GtkTr
/* Démarre l'actualisation du filtrage des paramètres. */
-static void update_filtered_bookmarks(GBookmarksPanel *, const regex_t *);
+static void update_filtered_bookmarks(GBookmarksPanel *);
/* Détermine si un signet doit être filtré ou non. */
static bool is_bookmark_filtered(GBookmarksPanel *, const char *, const char *, const char *);
@@ -181,8 +179,7 @@ static void mcb_bookmarks_panel_filter(GtkMenuItem *, GBookmarksPanel *);
/* Indique le type définit pour un panneau d'affichage des signets liés à un binaire. */
-G_DEFINE_TYPE_WITH_CODE(GBookmarksPanel, g_bookmarks_panel, G_TYPE_PANEL_ITEM,
- G_IMPLEMENT_INTERFACE(GTK_TYPE_DOCKABLE, g_bookmarks_panel_dockable_interface_init));
+G_DEFINE_TYPE(GBookmarksPanel, g_bookmarks_panel, G_TYPE_PANEL_ITEM);
/******************************************************************************
@@ -201,6 +198,7 @@ static void g_bookmarks_panel_class_init(GBookmarksPanelClass *klass)
{
GObjectClass *object; /* Autre version de la classe */
GEditorItemClass *editem; /* Encore une autre vision... */
+ GPanelItemClass *panel; /* Version parente de la classe*/
gchar *filename; /* Chemin d'accès à utiliser */
object = G_OBJECT_CLASS(klass);
@@ -212,6 +210,15 @@ static void g_bookmarks_panel_class_init(GBookmarksPanelClass *klass)
editem->update_binary = (update_item_binary_fc)reload_bookmarks_into_treeview;
+ panel = G_PANEL_ITEM_CLASS(klass);
+
+ panel->can_search = true;
+ panel->can_be_closed = true;
+
+ panel->update_filtered = (update_filtered_fc)update_filtered_bookmarks;
+
+ panel->gid = setup_tiny_global_work_group(1);
+
filename = find_pixmap_file("bookmark.png");
assert(filename != NULL);
@@ -349,35 +356,6 @@ static void g_bookmarks_panel_init(GBookmarksPanel *panel)
/******************************************************************************
* *
-* Paramètres : iface = interface GTK à initialiser. *
-* *
-* Description : Procède à l'initialisation de l'interface de rassemblement. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_bookmarks_panel_dockable_interface_init(GtkDockableInterface *iface)
-{
- GtkDockableInterface *parent_iface; /* Définition précédente */
-
- parent_iface = (GtkDockableInterface *)g_type_interface_peek_parent(iface);
-
- iface->can_search = true;
- iface->can_be_closed = true;
-
- iface->get_name = parent_iface->get_name;
- iface->get_desc = parent_iface->get_desc;
- iface->get_widget = parent_iface->get_widget;
- iface->update_filtered = (update_filtered_data_fc)update_filtered_bookmarks;
-
-}
-
-
-/******************************************************************************
-* *
* Paramètres : panel = instance d'objet GLib à traiter. *
* *
* Description : Supprime toutes les références externes. *
@@ -966,7 +944,6 @@ static void on_param_value_edited(GtkCellRendererText *renderer, gchar *path, gc
/******************************************************************************
* *
* Paramètres : panel = panneau assurant l'affichage des paramètres. *
-* preg = expression régulière compilée à utiliser. *
* *
* Description : Démarre l'actualisation du filtrage des paramètres. *
* *
@@ -976,11 +953,9 @@ static void on_param_value_edited(GtkCellRendererText *renderer, gchar *path, gc
* *
******************************************************************************/
-static void update_filtered_bookmarks(GBookmarksPanel *panel, const regex_t *preg)
+static void update_filtered_bookmarks(GBookmarksPanel *panel)
{
- panel->filter = preg;
-
- reload_bookmarks_into_treeview(panel, panel->binary);
+ //reload_bookmarks_into_treeview(panel, panel->binary);
}