Commit 770938bf authored by Tim Janik's avatar Tim Janik Committed by Tim Janik
Browse files

got rid of gtk_widget_popup(), a function that bad needs to be nuked, not

Sun Apr  1 08:00:13 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtkwidget.[hc]: got rid of gtk_widget_popup(), a function that
        bad needs to be nuked, not just deprecated.

        * gtk/gtktooltips.c (gtk_tooltips_draw_tips): don't use
        gtk_widget_popup().

        * gtk/*.[hc]: s/activate_mnemonic/mnemonic_activate/g;

        * gtk/gtkmenufactory.[hc]: removed this long-standingly deprecated
        widget.

        * docs/Changes-2.0.txt: updates.
parent 270e4f18
Sun Apr 1 08:00:13 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.[hc]: got rid of gtk_widget_popup(), a function that
bad needs to be nuked, not just deprecated.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips): don't use
gtk_widget_popup().
* gtk/*.[hc]: s/activate_mnemonic/mnemonic_activate/g;
* gtk/gtkmenufactory.[hc]: removed this long-standingly deprecated
widget.
* docs/Changes-2.0.txt: updates.
Sun Apr 1 01:02:54 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_sort_iter_changed):
......
Sun Apr 1 08:00:13 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.[hc]: got rid of gtk_widget_popup(), a function that
bad needs to be nuked, not just deprecated.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips): don't use
gtk_widget_popup().
* gtk/*.[hc]: s/activate_mnemonic/mnemonic_activate/g;
* gtk/gtkmenufactory.[hc]: removed this long-standingly deprecated
widget.
* docs/Changes-2.0.txt: updates.
Sun Apr 1 01:02:54 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_sort_iter_changed):
......
Sun Apr 1 08:00:13 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.[hc]: got rid of gtk_widget_popup(), a function that
bad needs to be nuked, not just deprecated.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips): don't use
gtk_widget_popup().
* gtk/*.[hc]: s/activate_mnemonic/mnemonic_activate/g;
* gtk/gtkmenufactory.[hc]: removed this long-standingly deprecated
widget.
* docs/Changes-2.0.txt: updates.
Sun Apr 1 01:02:54 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_sort_iter_changed):
......
Sun Apr 1 08:00:13 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.[hc]: got rid of gtk_widget_popup(), a function that
bad needs to be nuked, not just deprecated.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips): don't use
gtk_widget_popup().
* gtk/*.[hc]: s/activate_mnemonic/mnemonic_activate/g;
* gtk/gtkmenufactory.[hc]: removed this long-standingly deprecated
widget.
* docs/Changes-2.0.txt: updates.
Sun Apr 1 01:02:54 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_sort_iter_changed):
......
Sun Apr 1 08:00:13 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.[hc]: got rid of gtk_widget_popup(), a function that
bad needs to be nuked, not just deprecated.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips): don't use
gtk_widget_popup().
* gtk/*.[hc]: s/activate_mnemonic/mnemonic_activate/g;
* gtk/gtkmenufactory.[hc]: removed this long-standingly deprecated
widget.
* docs/Changes-2.0.txt: updates.
Sun Apr 1 01:02:54 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_sort_iter_changed):
......
Sun Apr 1 08:00:13 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.[hc]: got rid of gtk_widget_popup(), a function that
bad needs to be nuked, not just deprecated.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips): don't use
gtk_widget_popup().
* gtk/*.[hc]: s/activate_mnemonic/mnemonic_activate/g;
* gtk/gtkmenufactory.[hc]: removed this long-standingly deprecated
widget.
* docs/Changes-2.0.txt: updates.
Sun Apr 1 01:02:54 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_sort_iter_changed):
......
Sun Apr 1 08:00:13 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.[hc]: got rid of gtk_widget_popup(), a function that
bad needs to be nuked, not just deprecated.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips): don't use
gtk_widget_popup().
* gtk/*.[hc]: s/activate_mnemonic/mnemonic_activate/g;
* gtk/gtkmenufactory.[hc]: removed this long-standingly deprecated
widget.
* docs/Changes-2.0.txt: updates.
Sun Apr 1 01:02:54 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_sort_iter_changed):
......
......@@ -206,12 +206,16 @@ Incompatible Changes from GTK+-1.2 to GTK+-2.0:
#define gdk_cursor_destroy gdk_cursor_unref
(Note that g_object_ref() and g_object_unref() may be used for all of
the above.)
the above _ref and _unref functions.)
#define gdk_window_copy_area(drawable,gc,x,y,source_drawable,source_x,source_y,width,height) \
gdk_draw_pixmap(drawable,gc,source_drawable,source_x,source_y,x,y,width,height)
#define gdk_rgb_get_cmap gdk_rgb_get_colormap
gtk_widget_popup() was removed, it was only usable for GtkWindows, and
there the same effect can be achived by gtk_widget_set_uposition() and
gtk_widget_show().
* gdk_pixmap_foreign_new() no longer calls XFreePixmap() on the
pixmap when the GdkPixmap is finalized. This change corresponds
......
......@@ -717,6 +717,15 @@ produce superscript and subscript.
</para>
<!-- ##### SIGNAL GtkWidget::activate-mnemonic ##### -->
<para>
</para>
@widget: the object which received the signal.
@arg1:
@Returns:
<!-- ##### SIGNAL GtkWidget::debug-msg ##### -->
<para>
......@@ -1454,6 +1463,34 @@ Set the varargs type for a fundamental type @foreign_type.
fundamental type.
@varargs_type: Must be a GtkType which is either structured or flag, or NONE.
<!-- ##### FUNCTION gtk_widget_activate_mnemonic ##### -->
<para>
</para>
@widget:
@group_cycling:
@Returns:
<!-- ##### FUNCTION gtk_widget_popup ##### -->
<para>
</para>
@widget:
@x:
@y:
<!-- ##### FUNCTION gtk_window_activate_mnemonic ##### -->
<para>
</para>
@window:
@keyval:
@modifier:
@Returns:
<!-- ##### FUNCTION gtk_window_get_default_accel_group ##### -->
<para>
......
......@@ -20,11 +20,13 @@ GtkTreeStore
</para>
@parent:
@sort_list:
@stamp:
@root:
@last:
@n_columns:
@sort_column_id:
@sort_list:
@order:
@column_headers:
<!-- ##### FUNCTION gtk_tree_store_new ##### -->
......
......@@ -571,16 +571,6 @@ GtkWidget
@new_parent:
<!-- ##### FUNCTION gtk_widget_popup ##### -->
<para>
</para>
@widget:
@x:
@y:
<!-- ##### FUNCTION gtk_widget_intersect ##### -->
<para>
......@@ -1249,16 +1239,6 @@ GtkWidget
@Returns:
<!-- ##### FUNCTION gtk_widget_activate_mnemonic ##### -->
<para>
</para>
@widget:
@group_cycling:
@Returns:
<!-- ##### FUNCTION gtk_widget_class_install_style_property ##### -->
<para>
......@@ -1332,15 +1312,6 @@ GtkWidget
@var_args:
<!-- ##### SIGNAL GtkWidget::activate-mnemonic ##### -->
<para>
</para>
@widget: the object which received the signal.
@arg1:
@Returns:
<!-- ##### SIGNAL GtkWidget::add-accelerator ##### -->
<para>
......@@ -1609,6 +1580,15 @@ a widget changes from un-anchored to anchored or vice-versa.
@event:
@Returns:
<!-- ##### SIGNAL GtkWidget::mnemonic-activate ##### -->
<para>
</para>
@widget: the object which received the signal.
@arg1:
@Returns:
<!-- ##### SIGNAL GtkWidget::motion-notify-event ##### -->
<para>
......
......@@ -236,17 +236,6 @@ it's larger
@Returns:
<!-- ##### FUNCTION gtk_window_activate_mnemonic ##### -->
<para>
</para>
@window:
@keyval:
@modifier:
@Returns:
<!-- ##### FUNCTION gtk_window_add_mnemonic ##### -->
<para>
......
......@@ -121,7 +121,6 @@ gtk_public_h_sources = @STRIP_BEGIN@ \
gtkmain.h \
gtkmenu.h \
gtkmenubar.h \
gtkmenufactory.h \
gtkmenuitem.h \
gtkmenushell.h \
gtkmessagedialog.h \
......@@ -281,7 +280,6 @@ gtk_c_sources = @STRIP_BEGIN@ \
gtkmain.c \
gtkmenu.c \
gtkmenubar.c \
gtkmenufactory.c \
gtkmenuitem.c \
gtkmenushell.c \
gtkmessagedialog.c \
......
......@@ -96,7 +96,6 @@
#include <gtk/gtkmain.h>
#include <gtk/gtkmenu.h>
#include <gtk/gtkmenubar.h>
#include <gtk/gtkmenufactory.h>
#include <gtk/gtkmenuitem.h>
#include <gtk/gtkmenushell.h>
#include <gtk/gtkmessagedialog.h>
......
......@@ -252,7 +252,7 @@ static void gtk_entry_paste (GtkEntry *entry,
static void gtk_entry_update_primary_selection (GtkEntry *entry);
static void gtk_entry_do_popup (GtkEntry *entry,
GdkEventButton *event);
static gboolean gtk_entry_activate_mnemonic (GtkWidget *widget,
static gboolean gtk_entry_mnemonic_activate (GtkWidget *widget,
gboolean group_cycling);
static GtkWidgetClass *parent_class = NULL;
......@@ -345,7 +345,7 @@ gtk_entry_class_init (GtkEntryClass *class)
widget_class->style_set = gtk_entry_style_set;
widget_class->direction_changed = gtk_entry_direction_changed;
widget_class->state_changed = gtk_entry_state_changed;
widget_class->activate_mnemonic = gtk_entry_activate_mnemonic;
widget_class->mnemonic_activate = gtk_entry_mnemonic_activate;
widget_class->drag_motion = gtk_entry_drag_motion;
widget_class->drag_leave = gtk_entry_drag_leave;
......@@ -3150,7 +3150,7 @@ activate_cb (GtkWidget *menuitem,
static gboolean
gtk_entry_activate_mnemonic (GtkWidget *widget,
gtk_entry_mnemonic_activate (GtkWidget *widget,
gboolean group_cycling)
{
gtk_widget_grab_focus (widget);
......
......@@ -32,7 +32,6 @@
#include <gtk/gtkwidget.h>
#include <gtk/gtkmenufactory.h> /* for GtkMenuEntry */
#include <gtk/gtkbindings.h> /* for GtkPatternSpec */
......@@ -217,6 +216,15 @@ void gtk_item_factory_set_translate_func (GtkItemFactory *ifactory,
/* Compatibility functions for deprecated GtkMenuFactory code
*/
typedef void (*GtkMenuCallback) (GtkWidget *widget,
gpointer user_data);
typedef struct {
gchar *path;
gchar *accelerator;
GtkMenuCallback callback;
gpointer callback_data;
GtkWidget *widget;
} GtkMenuEntry;
GtkItemFactory* gtk_item_factory_from_path (const gchar *path);
void gtk_item_factory_create_menu_entries (guint n_entries,
GtkMenuEntry *entries);
......
......@@ -123,7 +123,7 @@ static void gtk_label_select_region_index (GtkLabel *label,
gint anchor_index,
gint end_index);
static gboolean gtk_label_activate_mnemonic (GtkWidget *widget,
static gboolean gtk_label_mnemonic_activate (GtkWidget *widget,
gboolean group_cycling);
......@@ -184,7 +184,7 @@ gtk_label_class_init (GtkLabelClass *class)
widget_class->button_release_event = gtk_label_button_release;
widget_class->motion_notify_event = gtk_label_motion;
widget_class->hierarchy_changed = gtk_label_hierarchy_changed;
widget_class->activate_mnemonic = gtk_label_activate_mnemonic;
widget_class->mnemonic_activate = gtk_label_mnemonic_activate;
g_object_class_install_property (G_OBJECT_CLASS(object_class),
PROP_LABEL,
......@@ -431,13 +431,13 @@ gtk_label_new_with_mnemonic (const gchar *str)
}
static gboolean
gtk_label_activate_mnemonic (GtkWidget *widget,
gtk_label_mnemonic_activate (GtkWidget *widget,
gboolean group_cycling)
{
GtkWidget *parent;
if (GTK_LABEL (widget)->mnemonic_widget)
return gtk_widget_activate_mnemonic (GTK_LABEL (widget)->mnemonic_widget, group_cycling);
return gtk_widget_mnemonic_activate (GTK_LABEL (widget)->mnemonic_widget, group_cycling);
/* Try to find the widget to activate by traversing the
* widget's ancestry.
......@@ -449,7 +449,7 @@ gtk_label_activate_mnemonic (GtkWidget *widget,
(!group_cycling && GTK_WIDGET_GET_CLASS (parent)->activate_signal) ||
(parent->parent && GTK_IS_NOTEBOOK (parent->parent)) ||
(GTK_IS_MENU_ITEM (parent)))
return gtk_widget_activate_mnemonic (parent, group_cycling);
return gtk_widget_mnemonic_activate (parent, group_cycling);
parent = parent->parent;
}
......@@ -509,7 +509,7 @@ gtk_label_hierarchy_changed (GtkWidget *widget)
* (i.e. when the target is a #GtkEntry next to the label) you need to
* set it explicitly using this function.
*
* The target widget will be accelerated by emitting "activate_mnemonic" on it.
* The target widget will be accelerated by emitting "mnemonic_activate" on it.
* The default handler for this signal will activate the widget if there are no
* mnemonic collisions and toggle focus between the colliding widgets otherwise.
**/
......
......@@ -67,7 +67,7 @@ static void gtk_real_menu_item_toggle_size_request (GtkMenuItem *menu_item,
gint *requisition);
static void gtk_real_menu_item_toggle_size_allocate (GtkMenuItem *menu_item,
gint allocation);
static gboolean gtk_menu_item_activate_mnemonic (GtkWidget *widget,
static gboolean gtk_menu_item_mnemonic_activate (GtkWidget *widget,
gboolean group_cycling);
static gint gtk_menu_item_select_timeout (gpointer data);
......@@ -140,7 +140,7 @@ gtk_menu_item_class_init (GtkMenuItemClass *klass)
widget_class->expose_event = gtk_menu_item_expose;
widget_class->show_all = gtk_menu_item_show_all;
widget_class->hide_all = gtk_menu_item_hide_all;
widget_class->activate_mnemonic = gtk_menu_item_activate_mnemonic;
widget_class->mnemonic_activate = gtk_menu_item_mnemonic_activate;
container_class->forall = gtk_menu_item_forall;
......@@ -606,7 +606,7 @@ gtk_real_menu_item_deselect (GtkItem *item)
}
static gboolean
gtk_menu_item_activate_mnemonic (GtkWidget *widget,
gtk_menu_item_mnemonic_activate (GtkWidget *widget,
gboolean group_cycling)
{
if (group_cycling)
......
......@@ -568,7 +568,7 @@ gtk_menu_shell_key_press (GtkWidget *widget,
toplevel = gtk_widget_get_toplevel (widget);
if (GTK_IS_WINDOW (toplevel) &&
gtk_window_activate_mnemonic (GTK_WINDOW (toplevel),
gtk_window_mnemonic_activate (GTK_WINDOW (toplevel),
event->keyval,
event->state))
return TRUE;
......
......@@ -95,7 +95,7 @@ struct _GtkNotebookPage
GtkRequisition requisition;
GtkAllocation allocation;
guint activate_mnemonic_signal;
guint mnemonic_activate_signal;
};
#ifdef G_DISABLE_CHECKS
......@@ -1977,9 +1977,9 @@ gtk_notebook_real_remove (GtkNotebook *notebook,
if (GTK_WIDGET_VISIBLE (page->child) && GTK_WIDGET_VISIBLE (notebook))
need_resize = TRUE;
if (page->tab_label && page->activate_mnemonic_signal)
if (page->tab_label && page->mnemonic_activate_signal)
gtk_signal_disconnect (page->tab_label,
page->activate_mnemonic_signal);
page->mnemonic_activate_signal);
gtk_widget_unparent (page->child);
......@@ -3636,7 +3636,7 @@ gtk_notebook_page_compare_tab (gconstpointer a,
}
static gboolean
gtk_notebook_activate_mnemonic_switch_page (GtkWidget *child,
gtk_notebook_mnemonic_activate_switch_page (GtkWidget *child,
gboolean overload,
gpointer data)
{
......@@ -3698,7 +3698,7 @@ gtk_notebook_insert_page_menu (GtkNotebook *notebook,
page->allocation.height = 0;
page->default_menu = FALSE;
page->default_tab = FALSE;
page->activate_mnemonic_signal = 0;
page->mnemonic_activate_signal = 0;
nchildren = g_list_length (notebook->children);
if ((position < 0) || (position > nchildren))
......@@ -3781,10 +3781,10 @@ gtk_notebook_insert_page_menu (GtkNotebook *notebook,
}
if (tab_label)
page->activate_mnemonic_signal =
page->mnemonic_activate_signal =
gtk_signal_connect (GTK_OBJECT (tab_label),
"activate_mnemonic",
(GtkSignalFunc) gtk_notebook_activate_mnemonic_switch_page,
"mnemonic_activate",
(GtkSignalFunc) gtk_notebook_mnemonic_activate_switch_page,
notebook);
}
......
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