~ubuntu-branches/ubuntu/quantal/gnumeric/quantal

« back to all changes in this revision

Viewing changes to src/dialogs/dialog-hyperlink.c

  • Committer: Bazaar Package Importer
  • Author(s): Gauvain Pocentek
  • Date: 2009-06-07 11:10:47 UTC
  • mfrom: (1.1.19 upstream) (2.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090607111047-l3rtbzfjxvmi1kx0
Tags: 1.9.8-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Promoted gnumeric-doc to Recommends in gnumeric package for help to be
    installed automatically
  - gnumeric-gtk is a transitional package
  - gnumeric conflicts with gnumeric-gtk << 1.8.3-3ubuntu1
  - call initltool-update in po*
  - remove psiconv support (psiconv is in universe):
    o debian/control: remove B-D on libpsiconv-dev
    o debian/rules: don't pass --with-psiconv to ./configure

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
#include <wbc-gtk.h>
40
40
#include <goffice/utils/go-file.h>
41
41
 
42
 
#include <gtk/gtkbox.h>
43
 
#include <gtk/gtkimage.h>
44
 
#include <gtk/gtklabel.h>
45
 
#include <gtk/gtksizegroup.h>
46
 
#include <gtk/gtklabel.h>
47
 
#include <gtk/gtkimagemenuitem.h>
48
 
#include <gtk/gtkcombobox.h>
49
 
#include <gtk/gtkcelllayout.h>
50
 
#include <gtk/gtkcellrenderertext.h>
51
 
#include <gtk/gtkcellrendererpixbuf.h>
 
42
#include <gtk/gtk.h>
52
43
#include <glib/gi18n-lib.h>
53
44
 
54
45
#include <string.h>
86
77
static void
87
78
dhl_set_tip (HyperlinkState* state)
88
79
{
89
 
        const char* tip = gnm_hlink_get_tip (state->link);
 
80
        char const * tip = gnm_hlink_get_tip (state->link);
90
81
 
91
82
        if (tip) {
92
83
                GtkWidget *w = glade_xml_get_widget (state->gui, "tip-entry");
282
273
dhl_set_target (HyperlinkState* state)
283
274
{
284
275
        unsigned i;
285
 
        const char* const target = gnm_hlink_get_target (state->link);
286
 
        const char* type_name;
 
276
        char const * const target = gnm_hlink_get_target (state->link);
 
277
        char const * type_name;
287
278
 
288
279
        if (target) {
289
280
                type_name = G_OBJECT_TYPE_NAME (state->link);
301
292
dhl_get_target (HyperlinkState *state, gboolean *success)
302
293
{
303
294
        unsigned i;
304
 
        const char *type_name = G_OBJECT_TYPE_NAME (state->link);
 
295
        char const *type_name = G_OBJECT_TYPE_NAME (state->link);
305
296
 
306
297
        *success = FALSE;
307
298
        for (i = 0 ; i < G_N_ELEMENTS (type); i++) {
342
333
                gnm_style_set_font_uline (style, UNDERLINE_SINGLE);
343
334
                gnm_style_set_font_color (style, style_color_new_name ("blue"));
344
335
 
345
 
                if (state->is_new)
 
336
                if (state->is_new) {
346
337
                        cmdname = _("Add Hyperlink");
347
 
                else
 
338
                        cmd_selection_hyperlink (WORKBOOK_CONTROL (state->wbcg), 
 
339
                                                 style,
 
340
                                                 cmdname, target);
 
341
                } else {
348
342
                        cmdname = _("Edit Hyperlink");
349
 
                cmd_selection_format (WORKBOOK_CONTROL (state->wbcg), style,
350
 
                                      NULL, cmdname);
351
 
                g_free (target);
 
343
                        cmd_selection_hyperlink (WORKBOOK_CONTROL (state->wbcg), 
 
344
                                                 style,
 
345
                                                 cmdname, NULL);
 
346
                        g_free (target);
 
347
                }
352
348
        } else if (!state->is_new) {
353
349
                style = gnm_style_new ();
354
350
                gnm_style_set_hlink (style, NULL);
355
351
                cmdname = _("Remove Hyperlink");
356
 
                cmd_selection_format (WORKBOOK_CONTROL (state->wbcg), style,
357
 
                                      NULL, cmdname);
 
352
                cmd_selection_hyperlink (WORKBOOK_CONTROL (state->wbcg), style,
 
353
                                         cmdname, NULL);
358
354
        }
359
355
        gtk_widget_destroy (state->dialog);
360
356
}
498
494
                G_CALLBACK (dhl_cb_menu_changed),
499
495
                state);
500
496
 
 
497
        gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog), 
 
498
                                           state->wbcg,
 
499
                                           GNM_DIALOG_DESTROY_CURRENT_SHEET_REMOVED);
 
500
        
501
501
        return FALSE;
502
502
}
503
503