~ubuntu-branches/ubuntu/lucid/epiphany-browser/lucid

« back to all changes in this revision

Viewing changes to lib/widgets/ephy-location-entry.c

  • Committer: Bazaar Package Importer
  • Author(s): Josselin Mouette, Gustavo Noronha Silva, Josselin Mouette
  • Date: 2009-11-13 19:28:48 UTC
  • mfrom: (1.3.10 sid)
  • Revision ID: james.westby@ubuntu.com-20091113192848-l1ktaulwcdb1cd2i
Tags: 2.29.1-2
[ Gustavo Noronha Silva ]
* debian/patches/04_set_prgname.patch:
- New patch, to make sure GNOME Shell is able to match the application
  windows to the .desktop file, and app well favourite.

[ Josselin Mouette ]
* Add a conflict with swfdec-mozilla, the plugin makes the browser 
  completely unusable on any website with Flash content.

Show diffs side-by-side

added added

removed removed

Lines of Context:
128
128
                GTK_WIDGET_CLASS (ephy_location_entry_parent_class)->style_set (widget, previous_style);
129
129
        }
130
130
 
131
 
        title_fg_colour = widget->style->text[GTK_STATE_INSENSITIVE];
 
131
        title_fg_colour = gtk_widget_get_style (widget)->text[GTK_STATE_INSENSITIVE];
132
132
 
133
133
        settings = gtk_settings_get_for_screen (gtk_widget_get_screen (widget));
134
134
        g_object_get (settings, "gtk-theme-name", &theme, NULL);
458
458
            (state == GDK_CONTROL_MASK ||
459
459
             state == (GDK_CONTROL_MASK | GDK_SHIFT_MASK)))
460
460
        {
461
 
                gtk_im_context_reset (entry->im_context);
 
461
                //gtk_im_context_reset (entry->im_context);
462
462
 
463
463
                priv->needs_reset = TRUE;
464
464
                g_signal_emit_by_name (entry, "activate");
519
519
                             state == (GDK_CONTROL_MASK | GDK_SHIFT_MASK));
520
520
 
521
521
        ephy_location_entry_set_location (entry, item, NULL);
522
 
        gtk_im_context_reset (GTK_ENTRY (entry->priv->entry)->im_context);
 
522
        //gtk_im_context_reset (GTK_ENTRY (entry->priv->entry)->im_context);
523
523
        g_signal_emit_by_name (priv->entry, "activate");
524
524
 
525
525
        g_free (item);
647
647
         * menu, and insert this menu item before it.
648
648
         * It's a bit of a hack, but there seems to be no better way to do it :/
649
649
         */
650
 
        children = GTK_MENU_SHELL (menu)->children;
 
650
        children = gtk_container_get_children (GTK_CONTAINER (menu));
651
651
        for (item = children; item != NULL && sep < 2; item = item->next, pos++)
652
652
        {
653
653
                if (GTK_IS_SEPARATOR_MENU_ITEM (item->data)) sep++;
703
703
        EphyLocationEntryPrivate *priv = entry->priv;
704
704
        char *title = NULL, *address = NULL;
705
705
        GString *text;
 
706
        GtkStyle *style;
706
707
        GdkDrawable *drawable;
707
708
        PangoContext *context;
708
709
        PangoLayout  *layout;
743
744
        layout = pango_layout_new (context);
744
745
 
745
746
        context = gtk_widget_get_pango_context (widget);
 
747
        style = gtk_widget_get_style (widget);
746
748
        metrics = pango_context_get_metrics (context,
747
 
                                             widget->style->font_desc,
 
749
                                             style->font_desc,
748
750
                                             pango_context_get_language (context));
749
751
 
750
752
        char_width = pango_font_metrics_get_approximate_digit_width (metrics);
769
771
                pixmap_height = layout_height / PANGO_SCALE + DRAG_ICON_LAYOUT_BORDER * 2;
770
772
        }
771
773
 
772
 
        drawable = gdk_pixmap_new (widget->window,
 
774
        drawable = gdk_pixmap_new (gtk_widget_get_window (widget),
773
775
                                   pixmap_width  + 2,
774
776
                                   pixmap_height + 2,
775
777
                                   -1);
776
778
 
777
779
        gdk_draw_rectangle (drawable,
778
 
                            widget->style->base_gc [GTK_WIDGET_STATE (widget)],
 
780
                            style->base_gc [gtk_widget_get_state (widget)],
779
781
                            TRUE,
780
782
                            0, 0,
781
783
                            pixmap_width + 1,
785
787
        if (priv->favicon != NULL)
786
788
        {
787
789
                gdk_draw_pixbuf (drawable,
788
 
                                 widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
 
790
                                 style->fg_gc[gtk_widget_get_state (widget)],
789
791
                                 priv->favicon,
790
792
                                 0, 0, 
791
793
                                 1 + DRAG_ICON_LAYOUT_BORDER + DRAG_ICON_ICON_SPACING,
795
797
        }
796
798
 
797
799
        gdk_draw_layout (drawable,
798
 
                         widget->style->text_gc [GTK_WIDGET_STATE (widget)],
 
800
                         style->text_gc [gtk_widget_get_state (widget)],
799
801
                         1 + DRAG_ICON_LAYOUT_BORDER + offset_x,
800
802
                         1 + DRAG_ICON_LAYOUT_BORDER,
801
803
                         layout);
802
804
 
803
805
        gdk_draw_rectangle (drawable,
804
 
                            widget->style->black_gc,
 
806
                            style->black_gc,
805
807
                            FALSE,
806
808
                            0, 0,
807
809
                            pixmap_width + 1,