~ubuntu-branches/ubuntu/lucid/gtk+2.0/lucid-proposed

« back to all changes in this revision

Viewing changes to gtk/gtkfilechooserdefault.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-03-11 18:28:01 UTC
  • mfrom: (1.11.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100311182801-wqr2drmus369zy6r
Tags: 2.19.7-0ubuntu1
* New upstream version
  - Bug fixes:
  611707 Move documentation from templates to inline comments
  69872 GTK_WIDGET_SET_FLAGS should be deprecated
  612066 empathy hangs when clicked on information about contact...
         (lp: #532947)
  557420 Some compose sequences don't work anymore...
  569042 gailbooleancell does not seem to attend to changes...
  600992 File chooser reference counting issues
  610905 gtk_drag_source_set need instrospection hint
  611051 Search Entry Clear Icon not accessible
  611217 Incorrect translator comment
  611317 Document targets in drag and drop
  611319 gtk_window_set_transient_for undocumented NULL value for parent
  611658 Update documentation for gtkvscrollbar
  611662 Update documentation for gtkvseparator
  611686 focus_in/focus_out in gailtreeview.c should return FALSE...
  611831 Move documentation to inline comments: GtkVBox
  612119 Do not scroll when middle pasting
  - Translation updates
* debian/patches/071_no_offscreen_widgets_grabbing.patch,
  debian/patches/091_bugzilla_tooltip_refresh.patch:
  - new version update
  - increased the alpha value for tooltips to 85%
* debian/rules:
  - updated the shlibs

Show diffs side-by-side

added added

removed removed

Lines of Context:
762
762
      GtkFileSystemVolume *volume;
763
763
 
764
764
      volume = col_data;
765
 
      _gtk_file_system_volume_free (volume);
 
765
      _gtk_file_system_volume_unref (volume);
766
766
    }
767
 
  else
 
767
  if (shortcut_type == SHORTCUT_TYPE_FILE)
768
768
    {
769
769
      GFile *file;
770
770
 
771
 
      g_assert (shortcut_type == SHORTCUT_TYPE_FILE);
772
 
 
773
771
      file = col_data;
774
772
      g_object_unref (file);
775
773
    }
1109
1107
  else
1110
1108
    gtk_widget_hide (impl->preview_box);
1111
1109
 
1112
 
  if (!GTK_WIDGET_MAPPED (impl))
 
1110
  if (!gtk_widget_get_mapped (GTK_WIDGET (impl)))
1113
1111
    emit_default_size_changed (impl);
1114
1112
}
1115
1113
 
2015
2013
            }
2016
2014
        }
2017
2015
 
2018
 
      shortcuts_insert_file (impl, start_row + n, SHORTCUT_TYPE_VOLUME, volume, NULL, NULL, FALSE, SHORTCUTS_VOLUMES);
 
2016
      shortcuts_insert_file (impl,
 
2017
                             start_row + n,
 
2018
                             SHORTCUT_TYPE_VOLUME,
 
2019
                             _gtk_file_system_volume_ref (volume),
 
2020
                             NULL,
 
2021
                             NULL,
 
2022
                             FALSE,
 
2023
                             SHORTCUTS_VOLUMES);
2019
2024
      n++;
2020
2025
    }
2021
2026
 
3437
3442
      if (shortcut_type == SHORTCUT_TYPE_SEPARATOR)
3438
3443
        return FALSE;
3439
3444
      else if (shortcut_type == SHORTCUT_TYPE_VOLUME)
3440
 
        {
3441
 
          return FALSE;
3442
 
        }
 
3445
        return FALSE;
3443
3446
      else if (shortcut_type == SHORTCUT_TYPE_FILE)
3444
3447
        {
3445
3448
          GFile *file;
3971
3974
      if (window
3972
3975
          && widget != window->default_widget
3973
3976
          && !(widget == window->focus_widget &&
3974
 
               (!window->default_widget || !GTK_WIDGET_SENSITIVE (window->default_widget))))
 
3977
               (!window->default_widget || !gtk_widget_get_sensitive (window->default_widget))))
3975
3978
        {
3976
3979
          gtk_window_activate_default (window);
3977
3980
          return TRUE;
4279
4282
  gint monitor_num;
4280
4283
  GdkRectangle monitor;
4281
4284
 
4282
 
  g_return_if_fail (GTK_WIDGET_REALIZED (widget));
 
4285
  g_return_if_fail (gtk_widget_get_realized (widget));
4283
4286
 
4284
4287
  gdk_window_get_origin (widget->window, x, y);
4285
4288
 
5051
5054
    }
5052
5055
  else if (impl->location_mode == LOCATION_MODE_FILENAME_ENTRY)
5053
5056
    {
5054
 
      if (GTK_WIDGET_HAS_FOCUS (impl->location_entry))
 
5057
      if (gtk_widget_has_focus (impl->location_entry))
5055
5058
        {
5056
5059
          location_mode_set (impl, LOCATION_MODE_PATH_BAR, TRUE);
5057
5060
        }
6182
6185
  GdkCursor *cursor;
6183
6186
 
6184
6187
  toplevel = get_toplevel (GTK_WIDGET (impl));
6185
 
  if (!toplevel || !GTK_WIDGET_REALIZED (toplevel))
 
6188
  if (!toplevel || !gtk_widget_get_realized (GTK_WIDGET (toplevel)))
6186
6189
    return;
6187
6190
 
6188
6191
  display = gtk_widget_get_display (GTK_WIDGET (toplevel));
6408
6411
       * that case, the chooser's selection should be what the caller expects,
6409
6412
       * as the user can't see that something else got selected.  See bug #165264.
6410
6413
       */
6411
 
      if (GTK_WIDGET_MAPPED (impl) && impl->action == GTK_FILE_CHOOSER_ACTION_OPEN)
 
6414
      if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN &&
 
6415
          gtk_widget_get_mapped (GTK_WIDGET (impl)))
6412
6416
        browse_files_select_first_row (impl);
6413
6417
    }
6414
6418
 
8030
8034
 
8031
8035
      if (impl->preview_widget_active &&
8032
8036
          impl->preview_widget &&
8033
 
          GTK_WIDGET_VISIBLE (impl->preview_widget))
 
8037
          gtk_widget_get_visible (impl->preview_widget))
8034
8038
        {
8035
8039
          gtk_widget_size_request (impl->preview_box, &req);
8036
8040
          *default_width += PREVIEW_HBOX_SPACING + req.width;
8037
8041
        }
8038
8042
 
8039
8043
      if (impl->extra_widget &&
8040
 
          GTK_WIDGET_VISIBLE (impl->extra_widget))
 
8044
          gtk_widget_get_visible (impl->extra_widget))
8041
8045
        {
8042
8046
          gtk_widget_size_request (impl->extra_align, &req);
8043
8047
          *default_height += GTK_BOX (chooser_embed)->spacing + req.height;
8145
8149
  GtkWidget *button;
8146
8150
 
8147
8151
  button = gtk_button_new_with_mnemonic (mnemonic_label);
8148
 
  GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
 
8152
  gtk_widget_set_can_default (button, TRUE);
8149
8153
  gtk_button_set_image (GTK_BUTTON (button),
8150
8154
                        gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON));
8151
8155
  gtk_widget_show (button);
9769
9773
    _gtk_file_system_get_info (data->impl->file_system, data->file,
9770
9774
                               "standard::type",
9771
9775
                               shortcuts_activate_get_info_cb, data);
 
9776
 
 
9777
  if (volume)
 
9778
    _gtk_file_system_volume_unref (volume);
9772
9779
}
9773
9780
 
9774
9781
static void