~ubuntu-branches/ubuntu/precise/evolution/precise

« back to all changes in this revision

Viewing changes to shell/e-shell-window-actions.c

  • Committer: Package Import Robot
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2011-09-08 09:38:57 UTC
  • mfrom: (1.1.84 upstream)
  • Revision ID: package-import@ubuntu.com-20110908093857-6lfl04ke2ns3kx2o
Tags: 3.1.91-0ubuntu1
* New upstream release. (LP: #843769)
* debian/control: bump e-d-s Build-Depends to 3.1.91. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1257
1257
 
1258
1258
static void
1259
1259
action_new_view_window_cb (GtkAction *action,
1260
 
                           EShellWindow *shell_window)
 
1260
                           EShellWindow *shell_window)
1261
1261
{
1262
1262
        EShell *shell;
1263
1263
        const gchar *view_name;
2102
2102
}
2103
2103
 
2104
2104
static GtkAction *
2105
 
e_shell_window_create_switcher_action (GType type, EShellViewClass *class,
2106
 
                                       const gchar *name, const gchar *tooltip,
2107
 
                                       const gchar *view_name)
 
2105
e_shell_window_create_switcher_action (GType type,
 
2106
                                       EShellViewClass *class,
 
2107
                                       const gchar *name,
 
2108
                                       const gchar *tooltip,
 
2109
                                       const gchar *view_name)
2108
2110
{
2109
2111
        GtkAction *action;
2110
2112
 
2111
 
        action = g_object_new (type, "name", name,
2112
 
                               "label", class->label,
2113
 
                               "tooltip", tooltip,
2114
 
                               "icon-name", class->icon_name,
2115
 
                               NULL);
 
2113
        action = g_object_new (
 
2114
                type,
 
2115
                "name", name,
 
2116
                "label", class->label,
 
2117
                "tooltip", tooltip,
 
2118
                "icon-name", class->icon_name,
 
2119
                NULL);
2116
2120
 
2117
 
        g_object_set_data (G_OBJECT (action), "view-name",
2118
 
                           (gpointer) view_name);
 
2121
        g_object_set_data (
 
2122
                G_OBJECT (action),
 
2123
                "view-name", (gpointer) view_name);
2119
2124
 
2120
2125
        return action;
2121
2126
}
2193
2198
 
2194
2199
                tooltip = g_strdup_printf (_("Switch to %s"), class->label);
2195
2200
 
2196
 
                s_action_name = g_strdup_printf (E_SHELL_SWITCHER_FORMAT, view_name);
 
2201
                s_action_name = g_strdup_printf (
 
2202
                        E_SHELL_SWITCHER_FORMAT, view_name);
2197
2203
 
2198
2204
                /* Note, we have to set "icon-name" separately because
2199
2205
                 * gtk_radio_action_new() expects a "stock-id".  Sadly,
2200
2206
                 * GTK+ still distinguishes between the two. */
2201
2207
 
2202
2208
                s_action = GTK_RADIO_ACTION (
2203
 
                        e_shell_window_create_switcher_action (GTK_TYPE_RADIO_ACTION,
2204
 
                                                               class, s_action_name,
2205
 
                                                               tooltip, view_name));
2206
 
                g_object_set (G_OBJECT (s_action), "value", ii++, NULL);
 
2209
                        e_shell_window_create_switcher_action (
 
2210
                                GTK_TYPE_RADIO_ACTION,
 
2211
                                class, s_action_name,
 
2212
                                tooltip, view_name));
 
2213
                g_object_set (s_action, "value", ii++, NULL);
2207
2214
                gtk_radio_action_set_group (s_action, group);
2208
2215
                group = gtk_radio_action_get_group (s_action);
2209
2216
 
2226
2233
                g_free (s_action_name);
2227
2234
 
2228
2235
                /* Create in new window actions */
2229
 
                n_action_name = g_strdup_printf (E_SHELL_NEW_WINDOW_FORMAT, view_name);
2230
 
                n_action = e_shell_window_create_switcher_action (GTK_TYPE_ACTION,
2231
 
                                                                  class, n_action_name,
2232
 
                                                                  tooltip, view_name);
2233
 
                g_signal_connect (G_OBJECT (n_action), "activate",
2234
 
                                  G_CALLBACK (action_new_view_window_cb),
2235
 
                                  shell_window);
 
2236
                n_action_name = g_strdup_printf (
 
2237
                        E_SHELL_NEW_WINDOW_FORMAT, view_name);
 
2238
                n_action = e_shell_window_create_switcher_action (
 
2239
                        GTK_TYPE_ACTION,
 
2240
                        class, n_action_name,
 
2241
                        tooltip, view_name);
 
2242
                g_signal_connect (
 
2243
                        n_action, "activate",
 
2244
                        G_CALLBACK (action_new_view_window_cb), shell_window);
2236
2245
                gtk_action_group_add_action (n_action_group, n_action);
2237
2246
 
2238
 
                e_shell_switcher_add_action (switcher, GTK_ACTION (s_action), n_action);
 
2247
                e_shell_switcher_add_action (
 
2248
                        switcher, GTK_ACTION (s_action), n_action);
2239
2249
 
2240
2250
                g_free (n_action_name);
2241
2251
                g_free (tooltip);