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

« back to all changes in this revision

Viewing changes to src/ephy-home-action.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:
179
179
                                   guint time,
180
180
                                   EphyHomeAction *action)
181
181
{
182
 
        gchar *action_name;
 
182
        GdkAtom       target;
 
183
        gchar        *action_name;
 
184
        const guchar *data;
 
185
        gint          length;
183
186
                        
184
187
        g_object_get (action, "name", &action_name, NULL);
185
188
        
186
189
        g_signal_stop_emission_by_name (widget, "drag_data_received");
187
190
 
188
 
        if (selection_data->length <= 0 || selection_data->data == NULL) return;
189
 
 
190
 
        if (selection_data->target == gdk_atom_intern (EPHY_DND_URL_TYPE, FALSE))
 
191
        length = gtk_selection_data_get_length (selection_data);
 
192
        data = gtk_selection_data_get_data (selection_data);
 
193
        target = gtk_selection_data_get_target (selection_data);
 
194
 
 
195
        if (length <= 0 || data == NULL) return;
 
196
 
 
197
        if (target == gdk_atom_intern (EPHY_DND_URL_TYPE, FALSE))
191
198
        {
192
199
                char **split;
193
200
 
194
 
                split = g_strsplit ((const gchar *)selection_data->data, "\n", 2);
 
201
                split = g_strsplit ((const gchar *) data, "\n", 2);
195
202
                if (split != NULL && split[0] != NULL && split[0][0] != '\0')
196
203
                {                       
197
204
                        action_name_association (GTK_ACTION (action), 
199
206
                }
200
207
                g_strfreev (split);
201
208
        }
202
 
        else if (selection_data->target == gdk_atom_intern (EPHY_DND_URI_LIST_TYPE, FALSE))
 
209
        else if (target == gdk_atom_intern (EPHY_DND_URI_LIST_TYPE, FALSE))
203
210
        {
204
211
                char **uris;
205
212
                int i;
231
238
static void
232
239
connect_proxy (GtkAction *action,
233
240
               GtkWidget *proxy)
234
 
{      
 
241
{
 
242
        GtkWidget *child;
235
243
        const gchar *action_name;
236
244
        
237
245
        GTK_ACTION_CLASS (ephy_home_action_parent_class)->connect_proxy (action, proxy);
240
248
 
241
249
        if (GTK_IS_TOOL_ITEM (proxy) && (strcmp (action_name, "GoHome") != 0))
242
250
        {
243
 
                g_signal_connect (GTK_BIN (proxy)->child, "drag-data-received",
 
251
                child = gtk_bin_get_child (GTK_BIN (proxy));
 
252
                g_signal_connect (child, "drag-data-received",
244
253
                                  G_CALLBACK (home_action_drag_data_received_cb), action);
245
 
                gtk_drag_dest_set (GTK_BIN (proxy)->child,
 
254
                gtk_drag_dest_set (child,
246
255
                                   GTK_DEST_DEFAULT_ALL,
247
256
                                   url_drag_types, G_N_ELEMENTS (url_drag_types),
248
257
                                   GDK_ACTION_MOVE | GDK_ACTION_COPY);
249
 
                gtk_drag_dest_add_text_targets (GTK_BIN (proxy)->child);
 
258
                gtk_drag_dest_add_text_targets (child);
250
259
        }
251
260
}
252
261