]> git.sur5r.net Git - glabels/blobdiff - src/new-label-dialog.c
Some coding style cleanup.
[glabels] / src / new-label-dialog.c
index aa0f04b4a2f76c14f57c00994c7e8f0ee1ce71d4..be122b5ab7a4f4d833c60f74f4fc42d45b793fff 100644 (file)
@@ -117,7 +117,7 @@ static void       set_info                            (glNewLabelDialog  *this,
 /*****************************************************************************/
 /* Boilerplate object stuff.                                                 */
 /*****************************************************************************/
-G_DEFINE_TYPE (glNewLabelDialog, gl_new_label_dialog, GTK_TYPE_ASSISTANT);
+G_DEFINE_TYPE (glNewLabelDialog, gl_new_label_dialog, GTK_TYPE_ASSISTANT)
 
 
 /*****************************************************************************/
@@ -169,7 +169,7 @@ gl_new_label_dialog_init (glNewLabelDialog *this)
         this->priv = g_new0 (glNewLabelDialogPrivate, 1);
 
         builder = gtk_builder_new ();
-        builder_filename = g_build_filename (GLABELS_DATA_DIR, "builder", "new-label-dialog.builder", NULL);
+        builder_filename = g_build_filename (GLABELS_DATA_DIR, "ui", "new-label-dialog.ui", NULL);
         gtk_builder_add_objects_from_file (builder, builder_filename, object_ids, &error);
         g_free (builder_filename);
         if (error) {
@@ -460,6 +460,7 @@ set_info (glNewLabelDialog  *this,
                 escaped_url = g_markup_escape_text (vendor->url, -1);
                 markup = g_strdup_printf ("<a href='%s'>%s</a>", escaped_url, vendor->name);
                 gtk_label_set_markup (GTK_LABEL (this->priv->vendor_label), markup);
+                gtk_widget_set_tooltip_text (this->priv->vendor_label, escaped_url);
                 g_free (escaped_url);
                 g_free (markup);
         }
@@ -467,6 +468,7 @@ set_info (glNewLabelDialog  *this,
         {
                 /* FIXME: Using set_markup instead of set_text to clear out previous link. */
                 gtk_label_set_markup (GTK_LABEL (this->priv->vendor_label), template->brand);
+                gtk_widget_set_has_tooltip (this->priv->vendor_label, FALSE);
         }
 
         if ( template->product_url )
@@ -477,6 +479,7 @@ set_info (glNewLabelDialog  *this,
                 escaped_url = g_markup_escape_text (template->product_url, -1);
                 markup = g_strdup_printf ("<a href='%s'>%s</a>", escaped_url, template->part);
                 gtk_label_set_markup (GTK_LABEL (this->priv->part_label), markup);
+                gtk_widget_set_tooltip_text (this->priv->part_label, escaped_url);
                 g_free (escaped_url);
                 g_free (markup);
         }
@@ -484,6 +487,7 @@ set_info (glNewLabelDialog  *this,
         {
                 /* FIXME: Using set_markup instead of set_text to clear out previous link. */
                 gtk_label_set_markup (GTK_LABEL (this->priv->part_label), template->part);
+                gtk_widget_set_has_tooltip (this->priv->part_label, FALSE);
         }
 
         list = lgl_db_get_similar_template_name_list (name);