~tuxator/midori/speeddial-refresh

« back to all changes in this revision

Viewing changes to src/midori-panel.c

  • Committer: Christian Dywan
  • Date: 2008-03-22 02:38:23 UTC
  • Revision ID: git-v1:be89221aea13aa092f64d2133fd5bed5c23f4972
Implement localization via Gettext.

Based on the implementation of localization via Gettext
contributed by Enrico Tröger, a few adjustments were made
to allow Midori to be properly localized. Initially
German is fully supported.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#include "midori-panel.h"
13
13
 
14
14
#include "sokoke.h"
 
15
#include <glib/gi18n.h>
15
16
 
16
17
G_DEFINE_TYPE (MidoriPanel, midori_panel, GTK_TYPE_HBOX)
17
18
 
136
137
                                     g_param_spec_enum (
137
138
                                     "shadow-type",
138
139
                                     "Shadow Type",
139
 
                                     "Appearance of the shadow around each panel",
 
140
                                     _("Appearance of the shadow around each panel"),
140
141
                                     GTK_TYPE_SHADOW_TYPE,
141
142
                                     GTK_SHADOW_NONE,
142
143
                                     flags));
146
147
                                     g_param_spec_object (
147
148
                                     "menu",
148
149
                                     "Menu",
149
 
                                     "Menu to hold panel items",
 
150
                                     _("Menu to hold panel items"),
150
151
                                     GTK_TYPE_MENU,
151
152
                                     G_PARAM_READWRITE));
152
153
 
155
156
                                     g_param_spec_int (
156
157
                                     "page",
157
158
                                     "Page",
158
 
                                     "The index of the current page",
 
159
                                     _("The index of the current page"),
159
160
                                     -1, G_MAXINT, -1,
160
161
                                     flags));
161
162
 
199
200
    gtk_container_set_border_width (GTK_CONTAINER (toolitem), 6);
200
201
    gtk_toolbar_insert (GTK_TOOLBAR (labelbar), toolitem, -1);
201
202
    toolitem = gtk_tool_button_new_from_stock (GTK_STOCK_CLOSE);
202
 
    gtk_tool_button_set_label (GTK_TOOL_BUTTON (toolitem), "Close panel");
203
 
    sokoke_tool_item_set_tooltip_text (GTK_TOOL_ITEM (toolitem), "Close panel");
 
203
    gtk_tool_button_set_label (GTK_TOOL_BUTTON (toolitem), _("Close panel"));
 
204
    sokoke_tool_item_set_tooltip_text (GTK_TOOL_ITEM (toolitem), _("Close panel"));
204
205
    g_signal_connect (toolitem, "clicked",
205
206
        G_CALLBACK (midori_panel_button_close_clicked_cb), panel);
206
207
    gtk_toolbar_insert (GTK_TOOLBAR (labelbar), toolitem, -1);
364
365
 
365
366
    guint n = midori_panel_page_num (panel, child);
366
367
 
367
 
    const gchar* text = label ? label : "Untitled";
 
368
    const gchar* text = label ? label : _("Untitled");
368
369
 
369
370
    GtkWidget* image;
370
371
    GtkToolItem* toolitem = gtk_radio_tool_button_new (priv->group);