aboutsummaryrefslogtreecommitdiff
path: root/src/fs
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-10-17 01:50:56 +0000
committerChristian Grothoff <christian@grothoff.org>2015-10-17 01:50:56 +0000
commit97aaab8c110e628785cbf103d5d71d3a28c068bd (patch)
tree0480f8b9bbee622b890c9cf4eff735dad2a11649 /src/fs
parent5e391f2af0dea1a693ec51b7cd26359367e21a43 (diff)
downloadgnunet-gtk-97aaab8c110e628785cbf103d5d71d3a28c068bd.tar.gz
gnunet-gtk-97aaab8c110e628785cbf103d5d71d3a28c068bd.zip
-modernize, stop using deprecated APIs
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/gnunet-fs-gtk_event-handler.c39
-rw-r--r--src/fs/gnunet-fs-gtk_publish-edit-dialog.c2
2 files changed, 32 insertions, 9 deletions
diff --git a/src/fs/gnunet-fs-gtk_event-handler.c b/src/fs/gnunet-fs-gtk_event-handler.c
index b46c7ec0..a55cbe49 100644
--- a/src/fs/gnunet-fs-gtk_event-handler.c
+++ b/src/fs/gnunet-fs-gtk_event-handler.c
@@ -1236,26 +1236,47 @@ populate_popup_with_uri_items (void *cls,
1236{ 1236{
1237 struct UriPopulationContext *ctx = cls; 1237 struct UriPopulationContext *ctx = cls;
1238 GtkWidget *child; 1238 GtkWidget *child;
1239 char *label; 1239 char *labels;
1240 GtkWidget *ns_association_icon; 1240 GtkWidget *ns_association_icon;
1241 char *uris; 1241 char *uris;
1242 GtkWidget *box;
1243 GtkWidget *label;
1244 GtkAccelGroup *accel_group;
1242 1245
1243 ctx->counter++; 1246 ctx->counter++;
1244 uris = GNUNET_FS_uri_to_string (uri); 1247 uris = GNUNET_FS_uri_to_string (uri);
1245 GNUNET_asprintf (&label, 1248 GNUNET_asprintf (&labels,
1246 _("URI #%d: %s"), 1249 _("URI #%d: %s"),
1247 ctx->counter, 1250 ctx->counter,
1248 uris); 1251 uris);
1249 GNUNET_free (uris); 1252 GNUNET_free (uris);
1250 child = gtk_image_menu_item_new_with_label (label); 1253 label = gtk_accel_label_new (labels);
1251 GNUNET_free (label); 1254 GNUNET_free (labels);
1252 1255 box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL,
1256 2);
1257 child = gtk_menu_item_new ();
1253 ns_association_icon = gtk_image_new_from_icon_name ("gnunet-fs-gtk-ns-association", 1258 ns_association_icon = gtk_image_new_from_icon_name ("gnunet-fs-gtk-ns-association",
1254 GTK_ICON_SIZE_MENU); 1259 GTK_ICON_SIZE_MENU);
1255 1260 gtk_container_add (GTK_CONTAINER (box),
1256 /* Takes ownership of the icon */ 1261 ns_association_icon);
1257 gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (child), 1262 gtk_label_set_xalign (GTK_LABEL (label),
1258 ns_association_icon); 1263 0.0);
1264 accel_group = gtk_accel_group_new ();
1265 gtk_widget_add_accelerator (child,
1266 "activate",
1267 accel_group,
1268 GDK_KEY_m,
1269 GDK_CONTROL_MASK,
1270 GTK_ACCEL_VISIBLE);
1271 gtk_accel_label_set_accel_widget (GTK_ACCEL_LABEL (label),
1272 child);
1273 gtk_box_pack_end (GTK_BOX (box),
1274 label,
1275 TRUE,
1276 TRUE,
1277 0);
1278 gtk_container_add (GTK_CONTAINER (child),
1279 box);
1259 1280
1260 g_object_set_data_full (G_OBJECT (child), 1281 g_object_set_data_full (G_OBJECT (child),
1261 "fs-uri", 1282 "fs-uri",
diff --git a/src/fs/gnunet-fs-gtk_publish-edit-dialog.c b/src/fs/gnunet-fs-gtk_publish-edit-dialog.c
index 39eb06f6..1eb5448a 100644
--- a/src/fs/gnunet-fs-gtk_publish-edit-dialog.c
+++ b/src/fs/gnunet-fs-gtk_publish-edit-dialog.c
@@ -878,6 +878,7 @@ preserve_meta_items (void *cls, const char *plugin_name,
878} 878}
879 879
880 880
881#if HAVE_EXTRACTOR
881/** 882/**
882 * Type of a function that libextractor calls for each 883 * Type of a function that libextractor calls for each
883 * meta data item found. Used to get the mime type. 884 * meta data item found. Used to get the mime type.
@@ -914,6 +915,7 @@ le_callback (void *cls,
914 } 915 }
915 return 0; 916 return 0;
916} 917}
918#endif
917 919
918 920
919/** 921/**