diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/gtkext/Makefile.am | 1 | ||||
| -rw-r--r-- | src/gtkext/gtkdockpanel.c | 10 | ||||
| -rw-r--r-- | src/gtkext/gtkdropwindow.c | 150 | ||||
| -rw-r--r-- | src/gtkext/gtkdropwindow.h | 72 | 
4 files changed, 5 insertions, 228 deletions
| diff --git a/src/gtkext/Makefile.am b/src/gtkext/Makefile.am index bcaa730..67d1a49 100644 --- a/src/gtkext/Makefile.am +++ b/src/gtkext/Makefile.am @@ -14,7 +14,6 @@ libgtkext_la_SOURCES =					\  	gtkdockitem.h gtkdockitem.c			\  	gtkdockpanel.h gtkdockpanel.c		\  	gtkdockstation.h gtkdockstation.c	\ -	gtkdropwindow.h gtkdropwindow.c		\  	gtkgraphview.h gtkgraphview.c		\  	gtklinkrenderer.h gtklinkrenderer.c	\  	gtksourceview.h gtksourceview.c		\ diff --git a/src/gtkext/gtkdockpanel.c b/src/gtkext/gtkdockpanel.c index 79a4a0e..4b9668b 100644 --- a/src/gtkext/gtkdockpanel.c +++ b/src/gtkext/gtkdockpanel.c @@ -28,7 +28,6 @@  #include <string.h> -#include "gtkdropwindow.h"  #include "iodamarshal.h" @@ -244,9 +243,8 @@ static void gtk_dock_panel_init(GtkDockPanel *dpanel) -    dpanel->dropwin = gtk_drop_window_new(); - +#if 0          /* Make the "well label" a DnD destination. */          gtk_drag_dest_set          ( @@ -257,6 +255,7 @@ static void gtk_dock_panel_init(GtkDockPanel *dpanel)                  n_targets,              /* size of list */                  GDK_ACTION_COPY         /* what to do with data after dropped */          ); +#endif  } @@ -397,6 +396,7 @@ static gboolean gtk_dock_panel_drag_motion_cb(GtkDockPanel *dpanel, GdkDragConte      gint new_y;                             /* Ordonnée de la fenêtre      */      GtkRequisition req;                     /* Taille actuelle du panneau  */ +#if 0      if (!gtk_widget_get_visible(dpanel->dropwin))      {          gdk_window_get_origin(GTK_WIDGET(dpanel)->window, &new_x, &new_y); @@ -409,7 +409,7 @@ static gboolean gtk_dock_panel_drag_motion_cb(GtkDockPanel *dpanel, GdkDragConte          gtk_widget_show(dpanel->dropwin);      } - +#endif      return FALSE;  } @@ -434,7 +434,7 @@ static gboolean gtk_dock_panel_drag_motion_cb(GtkDockPanel *dpanel, GdkDragConte  static void gtk_dock_panel_drag_leave_cb(GtkDockPanel *dpanel, GdkDragContext *context, guint time, gpointer data)  { -    gtk_widget_hide(dpanel->dropwin); +    //gtk_widget_hide(dpanel->dropwin);  } diff --git a/src/gtkext/gtkdropwindow.c b/src/gtkext/gtkdropwindow.c deleted file mode 100644 index 3966f1d..0000000 --- a/src/gtkext/gtkdropwindow.c +++ /dev/null @@ -1,150 +0,0 @@ - -/* OpenIDA - Outil d'analyse de fichiers binaires - * gtkdropwindow.c - fenêtre de sélection de zone de destination pour dock - * - * Copyright (C) 2009 Cyrille Bagard - * - *  This file is part of OpenIDA. - * - *  OpenIDA is free software; you can redistribute it and/or modify - *  it under the terms of the GNU General Public License as published by - *  the Free Software Foundation; either version 3 of the License, or - *  (at your option) any later version. - * - *  OpenIDA is distributed in the hope that it will be useful, - *  but WITHOUT ANY WARRANTY; without even the implied warranty of - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - *  GNU General Public License for more details. - * - *  You should have received a copy of the GNU General Public License - *  along with Foobar.  If not, see <http://www.gnu.org/licenses/>. - */ - - -#include "gtkdropwindow.h" - - - - - -/* Accompagne le premier affichage de la fenêtre d'affichage. */ -static void gtk_drop_window_realize_cb(GtkDropWindow *, gpointer); - - - - -/* Détermine le type de fenêtre d'affichage pour destination de DnD. */ -G_DEFINE_TYPE(GtkDropWindow, gtk_drop_window, GTK_TYPE_WINDOW) - - - - - -/****************************************************************************** -*                                                                             * -*  Paramètres  : class = classe GTK à initialiser.                            * -*                                                                             * -*  Description : Procède à l'initialisation de la fenêtre d'affichage.        * -*                                                                             * -*  Retour      : -                                                            * -*                                                                             * -*  Remarques   : -                                                            * -*                                                                             * -******************************************************************************/ - -static void gtk_drop_window_class_init(GtkDropWindowClass *class) -{ - - -} - - -/****************************************************************************** -*                                                                             * -*  Paramètres  : dropwin = composant GTK à initialiser.                       * -*                                                                             * -*  Description : Procède à l'initialisation de la fenêtre d'affichage.        * -*                                                                             * -*  Retour      : -                                                            * -*                                                                             * -*  Remarques   : -                                                            * -*                                                                             * -******************************************************************************/ - -static void gtk_drop_window_init(GtkDropWindow *dropwin) -{ -    gtk_widget_set_size_request(GTK_WIDGET(dropwin), 89, 89); -    gtk_window_set_decorated(GTK_WINDOW(dropwin), FALSE); - -    g_signal_connect(dropwin, "realize", G_CALLBACK(gtk_drop_window_realize_cb), NULL); - -} - - -/****************************************************************************** -*                                                                             * -*  Paramètres  : dropwin = composant GTK à initialiser.                       * -*                data    = adresse non utilisée ici.                          * -*                                                                             * -*  Description : Accompagne le premier affichage de la fenêtre d'affichage.   * -*                                                                             * -*  Retour      : -                                                            * -*                                                                             * -*  Remarques   : -                                                            * -*                                                                             * -******************************************************************************/ - -static void gtk_drop_window_realize_cb(GtkDropWindow *dropwin, gpointer data) -{ -    gchar *filename;                        /* Fichier d'image à charger   */ -    GdkPixbuf *pixbuf;                      /* Données de l'image de fond  */ -    GdkPixmap *pixmap;                      /* Données de l'image à rendre */ -    GdkBitmap *mask;                        /* Zone utile de l'image       */ -    GtkStyle *style;                        /* Apparence de la fenêtre     */ - -    gdk_window_set_opacity(GTK_WIDGET(dropwin)->window, 0.5); - -    filename = find_pixmap_file("dropwin_back.png"); - -    if (filename != NULL) -    { -        pixbuf = gdk_pixbuf_new_from_file(filename, NULL); - -        if (GDK_IS_PIXBUF(pixbuf)) -        { -            gdk_pixbuf_render_pixmap_and_mask(pixbuf, &pixmap, &mask, 1); - -            style = gtk_style_copy(gtk_widget_get_style(GTK_WIDGET(dropwin))); -            style->bg_pixmap[GTK_STATE_NORMAL] = pixmap; -            gtk_widget_set_style(GTK_WIDGET(dropwin), style); - -            gdk_window_shape_combine_mask(GTK_WIDGET(dropwin)->window, mask, 0, 0); - -        } - -        g_free(filename); - -    } - -    gdk_window_clear(GTK_WIDGET(dropwin)->window); - -} - - -/****************************************************************************** -*                                                                             * -*  Paramètres  : -                                                            * -*                                                                             * -*  Description : Crée un nouveau composant pour station dockable.             * -*                                                                             * -*  Retour      : -                                                            * -*                                                                             * -*  Remarques   : -                                                            * -*                                                                             * -******************************************************************************/ - -GtkWidget *gtk_drop_window_new(void) -{ -    return g_object_new(GTK_TYPE_DROP_WINDOW, NULL); - -} diff --git a/src/gtkext/gtkdropwindow.h b/src/gtkext/gtkdropwindow.h deleted file mode 100644 index c7852be..0000000 --- a/src/gtkext/gtkdropwindow.h +++ /dev/null @@ -1,72 +0,0 @@ - -/* OpenIDA - Outil d'analyse de fichiers binaires - * gtkdropwindow.h - prototypes pour la fenêtre de sélection de zone de destination pour dock - * - * Copyright (C) 2009-2012 Cyrille Bagard - * - *  This file is part of OpenIDA. - * - *  OpenIDA is free software; you can redistribute it and/or modify - *  it under the terms of the GNU General Public License as published by - *  the Free Software Foundation; either version 3 of the License, or - *  (at your option) any later version. - * - *  OpenIDA is distributed in the hope that it will be useful, - *  but WITHOUT ANY WARRANTY; without even the implied warranty of - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - *  GNU General Public License for more details. - * - *  You should have received a copy of the GNU General Public License - *  along with Foobar.  If not, see <http://www.gnu.org/licenses/>. - */ - - -#ifndef _GTKEXT_GTKDROPWINDOW_H -#define _GTKEXT_GTKDROPWINDOW_H - - -#include <gtk/gtk.h> - - - -G_BEGIN_DECLS - - - -#define GTK_TYPE_DROP_WINDOW            (gtk_drop_window_get_type()) -#define GTK_DROP_WINDOW(obj)            GTK_CHECK_CAST(obj, gtk_drop_window_get_type (), GtkDropWindow) -#define GTK_DROP_WINDOW_CLASS(klass)    GTK_CHECK_CLASS_CAST(klass, gtk_drop_window_get_type(), GtkDropWindowClass) -#define GTK_IS_DROP_WINDOW(obj)         GTK_CHECK_TYPE(obj, gtk_drop_window_get_type()) - - -typedef struct _GtkDropWindow GtkDropWindow; -typedef struct _GtkDropWindowClass GtkDropWindowClass; - - - -struct _GtkDropWindow -{ -    GtkWindow window;                       /* Présence obligatoire en 1er */ - -}; - -struct _GtkDropWindowClass -{ -    GtkWindowClass parent_class;            /* Présence obligatoire en 1er */ - -}; - - -/* Détermine le type de fenêtre d'affichage pour destination de DnD. */ -GType gtk_drop_window_get_type(void); - -/* Crée un nouveau composant pour station dockable. */ -GtkWidget *gtk_drop_window_new(void); - - - -G_END_DECLS - - - -#endif  /* _GTKEXT_GTKDROPWINDOW_H */ | 
