mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
Jump through a few hoops to make the tooltip on the filter combo box work
2004-11-06 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilechooserdefault.c (file_pane_create): Jump through a few hoops to make the tooltip on the filter combo box work a bit better. This fixes #157273 and #157074.
This commit is contained in:
parent
55a372042f
commit
14ed2beff5
@ -1,5 +1,9 @@
|
||||
2004-11-06 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (file_pane_create): Jump through
|
||||
a few hoops to make the tooltip on the filter combo box work
|
||||
a bit better. This fixes #157273 and #157074.
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_cell_layout_pack_end):
|
||||
Add the ComboCellInfo to the list. (#157528, Carlos Garnacho
|
||||
Parro)
|
||||
|
@ -1,5 +1,9 @@
|
||||
2004-11-06 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (file_pane_create): Jump through
|
||||
a few hoops to make the tooltip on the filter combo box work
|
||||
a bit better. This fixes #157273 and #157074.
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_cell_layout_pack_end):
|
||||
Add the ComboCellInfo to the list. (#157528, Carlos Garnacho
|
||||
Parro)
|
||||
|
@ -1,5 +1,9 @@
|
||||
2004-11-06 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (file_pane_create): Jump through
|
||||
a few hoops to make the tooltip on the filter combo box work
|
||||
a bit better. This fixes #157273 and #157074.
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_cell_layout_pack_end):
|
||||
Add the ComboCellInfo to the list. (#157528, Carlos Garnacho
|
||||
Parro)
|
||||
|
@ -1,5 +1,9 @@
|
||||
2004-11-06 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (file_pane_create): Jump through
|
||||
a few hoops to make the tooltip on the filter combo box work
|
||||
a bit better. This fixes #157273 and #157074.
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_cell_layout_pack_end):
|
||||
Add the ComboCellInfo to the list. (#157528, Carlos Garnacho
|
||||
Parro)
|
||||
|
@ -2260,6 +2260,7 @@ gtk_combo_box_menu_setup (GtkComboBox *combo_box,
|
||||
if (combo_box->priv->cell_view)
|
||||
{
|
||||
combo_box->priv->button = gtk_toggle_button_new ();
|
||||
|
||||
g_signal_connect (combo_box->priv->button, "toggled",
|
||||
G_CALLBACK (gtk_combo_box_button_toggled), combo_box);
|
||||
g_signal_connect_after (combo_box->priv->button,
|
||||
|
@ -3135,6 +3135,29 @@ create_path_bar (GtkFileChooserDefault *impl)
|
||||
return path_bar;
|
||||
}
|
||||
|
||||
static void
|
||||
set_filter_tooltip (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GtkTooltips *tooltips = (GtkTooltips *)data;
|
||||
|
||||
if (GTK_IS_BUTTON (widget))
|
||||
gtk_tooltips_set_tip (tooltips, widget,
|
||||
_("Select which types of files are shown"),
|
||||
NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
realize_filter_combo (GtkWidget *combo,
|
||||
gpointer data)
|
||||
{
|
||||
GtkFileChooserDefault *impl = (GtkFileChooserDefault *)data;
|
||||
|
||||
gtk_container_forall (GTK_CONTAINER (combo),
|
||||
set_filter_tooltip,
|
||||
impl->tooltips);
|
||||
}
|
||||
|
||||
/* Creates the widgets for the files/folders pane */
|
||||
static GtkWidget *
|
||||
file_pane_create (GtkFileChooserDefault *impl,
|
||||
@ -3142,7 +3165,6 @@ file_pane_create (GtkFileChooserDefault *impl,
|
||||
{
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *ebox;
|
||||
GtkWidget *widget;
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 6);
|
||||
@ -3185,17 +3207,12 @@ file_pane_create (GtkFileChooserDefault *impl,
|
||||
impl->filter_combo_hbox = gtk_hbox_new (FALSE, 12);
|
||||
|
||||
widget = filter_create (impl);
|
||||
ebox = gtk_event_box_new ();
|
||||
gtk_container_add (GTK_CONTAINER (ebox), widget);
|
||||
gtk_widget_show (ebox);
|
||||
/* We need enter/leave to do tooltips */
|
||||
gtk_widget_add_events (ebox, GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK);
|
||||
gtk_tooltips_set_tip (impl->tooltips, ebox,
|
||||
_("Select which types of files are shown"), NULL);
|
||||
|
||||
g_signal_connect (widget, "realize",
|
||||
G_CALLBACK (realize_filter_combo), impl);
|
||||
|
||||
gtk_widget_show (widget);
|
||||
gtk_box_pack_end (GTK_BOX (impl->filter_combo_hbox), ebox, FALSE, FALSE, 0);
|
||||
gtk_box_pack_end (GTK_BOX (impl->filter_combo_hbox), widget, FALSE, FALSE, 0);
|
||||
|
||||
gtk_size_group_add_widget (size_group, impl->filter_combo_hbox);
|
||||
gtk_box_pack_end (GTK_BOX (vbox), impl->filter_combo_hbox, FALSE, FALSE, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user