gtk_osx_openFile (GtkOSXApplication *app _U_, gchar *path, gpointer user_data _U_)
{
GtkSelectionData selection_data;
- int length = strlen(path);
-
- selection_data.length = length + 3;
- selection_data.data = g_malloc(length + 3);
- memcpy(selection_data.data, path, length);
-
- selection_data.data[length] = '\r';
- selection_data.data[length + 1] = '\n';
- selection_data.data[length + 2] = '\0';
+ gchar *selection_path;
+ int length = strlen(path) + 3;
+
+ selection_path = g_malloc(length + 3);
+ memcpy(selection_path, path, length);
+
+ selection_path[length] = '\r';
+ selection_path[length + 1] = '\n';
+ selection_path[length + 2] = '\0';
+ gtk_selection_data_set_text(&selection_data, selection_path, length);
dnd_data_received(NULL, NULL, 0, 0, &selection_data, DND_TARGET_URL, 0, 0);
- g_free(selection_data.data);
+ g_free(selection_path);
return TRUE;
}
#ifdef HAVE_GTKOSXAPPLICATION
GtkOSXApplication *theApp;
GtkWidget * item;
- GtkOSXApplicationMenuGroup *group;
GtkWidget * dock_menu;
#endif
gtk_osxapplication_set_menu_bar(theApp, GTK_MENU_SHELL(menubar));
gtk_osxapplication_set_use_quartz_accelerators(theApp, TRUE);
- group = gtk_osxapplication_add_app_menu_group (theApp);
+
item = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/HelpMenu/AboutWireshark");
- gtk_osxapplication_add_app_menu_item(theApp, group,GTK_MENU_ITEM (item));
+ gtk_osxapplication_insert_app_menu_item(theApp, item, 0);
- group = gtk_osxapplication_add_app_menu_group (theApp);
item = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/EditMenu/Preferences");
- gtk_osxapplication_add_app_menu_item(theApp, group,GTK_MENU_ITEM (item));
+ gtk_osxapplication_insert_app_menu_item(theApp, item, 0);
- group = gtk_osxapplication_add_app_menu_group (theApp);
item = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/HelpMenu");
gtk_osxapplication_set_help_menu(theApp,GTK_MENU_ITEM(item));