Commit 533cbc62 authored by claes's avatar claes

selection-clear-event wasn't remvoed in destructor

parent 1028193c
/* /*
* Proview $Id: wb_nav_gtk.cpp,v 1.1 2007-01-04 07:29:02 claes Exp $ * Proview $Id: wb_nav_gtk.cpp,v 1.2 2007-06-15 10:53:06 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -64,8 +64,8 @@ NavGtk::NavGtk( ...@@ -64,8 +64,8 @@ NavGtk::NavGtk(
GDK_SELECTION_TYPE_STRING, 1); GDK_SELECTION_TYPE_STRING, 1);
g_signal_connect( selection_widget, "selection-get", g_signal_connect( selection_widget, "selection-get",
G_CALLBACK( nav_sel_convert_cb), this); G_CALLBACK( nav_sel_convert_cb), this);
g_signal_connect( selection_widget, "selection-clear-event", sel_lose_id = g_signal_connect( selection_widget, "selection-clear-event",
G_CALLBACK( nav_sel_lose_cb), this); G_CALLBACK( nav_sel_lose_cb), this);
gtk_widget_show_all( brow_widget); gtk_widget_show_all( brow_widget);
set_inputfocus(0); set_inputfocus(0);
...@@ -79,6 +79,8 @@ NavGtk::NavGtk( ...@@ -79,6 +79,8 @@ NavGtk::NavGtk(
// //
NavGtk::~NavGtk() NavGtk::~NavGtk()
{ {
g_signal_handler_disconnect( selection_widget, sel_lose_id);
PalFile::config_tree_free( menu); PalFile::config_tree_free( menu);
free_pixmaps(); free_pixmaps();
gtk_widget_destroy( form_widget); gtk_widget_destroy( form_widget);
......
/* /*
* Proview $Id: wb_nav_gtk.h,v 1.1 2007-01-04 07:29:02 claes Exp $ * Proview $Id: wb_nav_gtk.h,v 1.2 2007-06-15 10:53:06 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -44,6 +44,7 @@ class NavGtk : public Nav { ...@@ -44,6 +44,7 @@ class NavGtk : public Nav {
GtkWidget *form_widget; GtkWidget *form_widget;
GtkWidget *toplevel; GtkWidget *toplevel;
GtkWidget *selection_widget; GtkWidget *selection_widget;
gulong sel_lose_id;
void set_inputfocus( int focus); void set_inputfocus( int focus);
void set_selection_owner(); void set_selection_owner();
......
/* /*
* Proview $Id: wb_pal_gtk.cpp,v 1.1 2007-01-04 07:29:02 claes Exp $ * Proview $Id: wb_pal_gtk.cpp,v 1.2 2007-06-15 10:53:06 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -70,8 +70,8 @@ PalGtk::PalGtk ( ...@@ -70,8 +70,8 @@ PalGtk::PalGtk (
GDK_SELECTION_TYPE_STRING, 1); GDK_SELECTION_TYPE_STRING, 1);
g_signal_connect( selection_widget, "selection-get", g_signal_connect( selection_widget, "selection-get",
G_CALLBACK( pal_sel_convert_cb), this); G_CALLBACK( pal_sel_convert_cb), this);
g_signal_connect( selection_widget, "selection-clear-event", sel_lose_id = g_signal_connect( selection_widget, "selection-clear-event",
G_CALLBACK( pal_sel_lose_cb), this); G_CALLBACK( pal_sel_lose_cb), this);
gtk_widget_show_all( brow_widget); gtk_widget_show_all( brow_widget);
set_inputfocus(0); set_inputfocus(0);
...@@ -85,6 +85,8 @@ PalGtk::PalGtk ( ...@@ -85,6 +85,8 @@ PalGtk::PalGtk (
// //
PalGtk::~PalGtk() PalGtk::~PalGtk()
{ {
g_signal_handler_disconnect( selection_widget, sel_lose_id);
PalFile::config_tree_free( menu); PalFile::config_tree_free( menu);
free_pixmaps(); free_pixmaps();
gtk_widget_destroy( form_widget); gtk_widget_destroy( form_widget);
......
/* /*
* Proview $Id: wb_pal_gtk.h,v 1.1 2007-01-04 07:29:02 claes Exp $ * Proview $Id: wb_pal_gtk.h,v 1.2 2007-06-15 10:53:06 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -42,6 +42,7 @@ class PalGtk : public Pal { ...@@ -42,6 +42,7 @@ class PalGtk : public Pal {
GtkWidget *form_widget; GtkWidget *form_widget;
GtkWidget *toplevel; GtkWidget *toplevel;
GtkWidget *selection_widget; GtkWidget *selection_widget;
gulong sel_lose_id;
void set_inputfocus( int focus); void set_inputfocus( int focus);
void set_selection_owner(); void set_selection_owner();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment