[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r36514 - gnunet-gtk/src/fs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r36514 - gnunet-gtk/src/fs |
Date: |
Sat, 17 Oct 2015 03:50:56 +0200 |
Author: grothoff
Date: 2015-10-17 03:50:56 +0200 (Sat, 17 Oct 2015)
New Revision: 36514
Modified:
gnunet-gtk/src/fs/gnunet-fs-gtk_event-handler.c
gnunet-gtk/src/fs/gnunet-fs-gtk_publish-edit-dialog.c
Log:
-modernize, stop using deprecated APIs
Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_event-handler.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_event-handler.c 2015-10-17 01:34:47 UTC
(rev 36513)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_event-handler.c 2015-10-17 01:50:56 UTC
(rev 36514)
@@ -1236,27 +1236,48 @@
{
struct UriPopulationContext *ctx = cls;
GtkWidget *child;
- char *label;
+ char *labels;
GtkWidget *ns_association_icon;
char *uris;
+ GtkWidget *box;
+ GtkWidget *label;
+ GtkAccelGroup *accel_group;
ctx->counter++;
uris = GNUNET_FS_uri_to_string (uri);
- GNUNET_asprintf (&label,
+ GNUNET_asprintf (&labels,
_("URI #%d: %s"),
ctx->counter,
uris);
GNUNET_free (uris);
- child = gtk_image_menu_item_new_with_label (label);
- GNUNET_free (label);
-
+ label = gtk_accel_label_new (labels);
+ GNUNET_free (labels);
+ box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL,
+ 2);
+ child = gtk_menu_item_new ();
ns_association_icon = gtk_image_new_from_icon_name
("gnunet-fs-gtk-ns-association",
GTK_ICON_SIZE_MENU);
+ gtk_container_add (GTK_CONTAINER (box),
+ ns_association_icon);
+ gtk_label_set_xalign (GTK_LABEL (label),
+ 0.0);
+ accel_group = gtk_accel_group_new ();
+ gtk_widget_add_accelerator (child,
+ "activate",
+ accel_group,
+ GDK_KEY_m,
+ GDK_CONTROL_MASK,
+ GTK_ACCEL_VISIBLE);
+ gtk_accel_label_set_accel_widget (GTK_ACCEL_LABEL (label),
+ child);
+ gtk_box_pack_end (GTK_BOX (box),
+ label,
+ TRUE,
+ TRUE,
+ 0);
+ gtk_container_add (GTK_CONTAINER (child),
+ box);
- /* Takes ownership of the icon */
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (child),
- ns_association_icon);
-
g_object_set_data_full (G_OBJECT (child),
"fs-uri",
GNUNET_FS_uri_dup (uri),
Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_publish-edit-dialog.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_publish-edit-dialog.c 2015-10-17
01:34:47 UTC (rev 36513)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_publish-edit-dialog.c 2015-10-17
01:50:56 UTC (rev 36514)
@@ -878,6 +878,7 @@
}
+#if HAVE_EXTRACTOR
/**
* Type of a function that libextractor calls for each
* meta data item found. Used to get the mime type.
@@ -914,6 +915,7 @@
}
return 0;
}
+#endif
/**
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r36514 - gnunet-gtk/src/fs,
gnunet <=