diff options
Diffstat (limited to 'Telegram/SourceFiles')
3 files changed, 70 insertions, 70 deletions
diff --git a/Telegram/SourceFiles/payments/ui/payments_panel.cpp b/Telegram/SourceFiles/payments/ui/payments_panel.cpp index f5c7015cc4..d081a3f7ad 100644 --- a/Telegram/SourceFiles/payments/ui/payments_panel.cpp +++ b/Telegram/SourceFiles/payments/ui/payments_panel.cpp @@ -120,7 +120,7 @@ void Panel::chooseShippingOption(const ShippingOptions &options) { .title = tr::lng_payments_shipping_method(), .options = list, .initialSelection = (i != end(options.list) - ? (i - begin(options.list)) + ? int(i - begin(options.list)) : -1), .callback = save, }); diff --git a/Telegram/SourceFiles/platform/linux/linux_gdk_helper.cpp b/Telegram/SourceFiles/platform/linux/linux_gdk_helper.cpp index cf9c1740d9..ab65c36ccb 100644 --- a/Telegram/SourceFiles/platform/linux/linux_gdk_helper.cpp +++ b/Telegram/SourceFiles/platform/linux/linux_gdk_helper.cpp @@ -65,8 +65,8 @@ bool GdkHelperLoadGtk2(QLibrary &lib) { #ifdef LINK_TO_GTK return false; #else // LINK_TO_GTK - if (!LOAD_GTK_SYMBOL(lib, "gdk_x11_drawable_get_xdisplay", gdk_x11_drawable_get_xdisplay)) return false; - if (!LOAD_GTK_SYMBOL(lib, "gdk_x11_drawable_get_xid", gdk_x11_drawable_get_xid)) return false; + if (!LOAD_GTK_SYMBOL(lib, gdk_x11_drawable_get_xdisplay)) return false; + if (!LOAD_GTK_SYMBOL(lib, gdk_x11_drawable_get_xid)) return false; return true; #endif // !LINK_TO_GTK #else // !DESKTOP_APP_DISABLE_X11_INTEGRATION @@ -76,10 +76,10 @@ bool GdkHelperLoadGtk2(QLibrary &lib) { bool GdkHelperLoadGtk3(QLibrary &lib) { #ifndef DESKTOP_APP_DISABLE_X11_INTEGRATION - if (!LOAD_GTK_SYMBOL(lib, "gdk_x11_window_get_type", gdk_x11_window_get_type)) return false; - if (!LOAD_GTK_SYMBOL(lib, "gdk_window_get_display", gdk_window_get_display)) return false; - if (!LOAD_GTK_SYMBOL(lib, "gdk_x11_display_get_xdisplay", gdk_x11_display_get_xdisplay)) return false; - if (!LOAD_GTK_SYMBOL(lib, "gdk_x11_window_get_xid", gdk_x11_window_get_xid)) return false; + if (!LOAD_GTK_SYMBOL(lib, gdk_x11_window_get_type)) return false; + if (!LOAD_GTK_SYMBOL(lib, gdk_window_get_display)) return false; + if (!LOAD_GTK_SYMBOL(lib, gdk_x11_display_get_xdisplay)) return false; + if (!LOAD_GTK_SYMBOL(lib, gdk_x11_window_get_xid)) return false; return true; #else // !DESKTOP_APP_DISABLE_X11_INTEGRATION return false; diff --git a/Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp b/Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp index e61be4910c..00b67e1526 100644 --- a/Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp +++ b/Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp @@ -60,73 +60,73 @@ void GtkIntegration::load() { auto &lib = BaseGtkIntegration::Instance()->library(); - LOAD_GTK_SYMBOL(lib, "gtk_widget_show", gtk_widget_show); - LOAD_GTK_SYMBOL(lib, "gtk_widget_hide", gtk_widget_hide); - LOAD_GTK_SYMBOL(lib, "gtk_widget_get_window", gtk_widget_get_window); - LOAD_GTK_SYMBOL(lib, "gtk_widget_realize", gtk_widget_realize); - LOAD_GTK_SYMBOL(lib, "gtk_widget_hide_on_delete", gtk_widget_hide_on_delete); - LOAD_GTK_SYMBOL(lib, "gtk_widget_destroy", gtk_widget_destroy); - LOAD_GTK_SYMBOL(lib, "gtk_clipboard_get", gtk_clipboard_get); - LOAD_GTK_SYMBOL(lib, "gtk_clipboard_store", gtk_clipboard_store); - LOAD_GTK_SYMBOL(lib, "gtk_clipboard_wait_for_contents", gtk_clipboard_wait_for_contents); - LOAD_GTK_SYMBOL(lib, "gtk_clipboard_wait_for_image", gtk_clipboard_wait_for_image); - LOAD_GTK_SYMBOL(lib, "gtk_selection_data_targets_include_image", gtk_selection_data_targets_include_image); - LOAD_GTK_SYMBOL(lib, "gtk_selection_data_free", gtk_selection_data_free); - LOAD_GTK_SYMBOL(lib, "gtk_file_chooser_dialog_new", gtk_file_chooser_dialog_new); - LOAD_GTK_SYMBOL(lib, "gtk_file_chooser_get_type", gtk_file_chooser_get_type); - LOAD_GTK_SYMBOL(lib, "gtk_image_get_type", gtk_image_get_type); - LOAD_GTK_SYMBOL(lib, "gtk_file_chooser_set_current_folder", gtk_file_chooser_set_current_folder); - LOAD_GTK_SYMBOL(lib, "gtk_file_chooser_get_current_folder", gtk_file_chooser_get_current_folder); - LOAD_GTK_SYMBOL(lib, "gtk_file_chooser_set_current_name", gtk_file_chooser_set_current_name); - LOAD_GTK_SYMBOL(lib, "gtk_file_chooser_select_filename", gtk_file_chooser_select_filename); - LOAD_GTK_SYMBOL(lib, "gtk_file_chooser_get_filenames", gtk_file_chooser_get_filenames); - LOAD_GTK_SYMBOL(lib, "gtk_file_chooser_set_filter", gtk_file_chooser_set_filter); - LOAD_GTK_SYMBOL(lib, "gtk_file_chooser_get_filter", gtk_file_chooser_get_filter); - LOAD_GTK_SYMBOL(lib, "gtk_window_get_type", gtk_window_get_type); - LOAD_GTK_SYMBOL(lib, "gtk_window_set_title", gtk_window_set_title); - LOAD_GTK_SYMBOL(lib, "gtk_file_chooser_set_local_only", gtk_file_chooser_set_local_only); - LOAD_GTK_SYMBOL(lib, "gtk_file_chooser_set_action", gtk_file_chooser_set_action); - LOAD_GTK_SYMBOL(lib, "gtk_file_chooser_set_select_multiple", gtk_file_chooser_set_select_multiple); - LOAD_GTK_SYMBOL(lib, "gtk_file_chooser_set_do_overwrite_confirmation", gtk_file_chooser_set_do_overwrite_confirmation); - LOAD_GTK_SYMBOL(lib, "gtk_file_chooser_remove_filter", gtk_file_chooser_remove_filter); - LOAD_GTK_SYMBOL(lib, "gtk_file_filter_set_name", gtk_file_filter_set_name); - LOAD_GTK_SYMBOL(lib, "gtk_file_filter_add_pattern", gtk_file_filter_add_pattern); - LOAD_GTK_SYMBOL(lib, "gtk_file_chooser_add_filter", gtk_file_chooser_add_filter); - LOAD_GTK_SYMBOL(lib, "gtk_file_chooser_set_preview_widget", gtk_file_chooser_set_preview_widget); - LOAD_GTK_SYMBOL(lib, "gtk_file_chooser_get_preview_filename", gtk_file_chooser_get_preview_filename); - LOAD_GTK_SYMBOL(lib, "gtk_file_chooser_set_preview_widget_active", gtk_file_chooser_set_preview_widget_active); - LOAD_GTK_SYMBOL(lib, "gtk_file_filter_new", gtk_file_filter_new); - LOAD_GTK_SYMBOL(lib, "gtk_image_new", gtk_image_new); - LOAD_GTK_SYMBOL(lib, "gtk_image_set_from_pixbuf", gtk_image_set_from_pixbuf); - - LOAD_GTK_SYMBOL(lib, "gdk_window_set_modal_hint", gdk_window_set_modal_hint); - LOAD_GTK_SYMBOL(lib, "gdk_window_focus", gdk_window_focus); - LOAD_GTK_SYMBOL(lib, "gtk_dialog_get_type", gtk_dialog_get_type); - LOAD_GTK_SYMBOL(lib, "gtk_dialog_run", gtk_dialog_run); - - LOAD_GTK_SYMBOL(lib, "gdk_atom_intern", gdk_atom_intern); - - LOAD_GTK_SYMBOL(lib, "gdk_display_get_default", gdk_display_get_default); - LOAD_GTK_SYMBOL(lib, "gdk_display_get_monitor", gdk_display_get_monitor); - LOAD_GTK_SYMBOL(lib, "gdk_display_get_primary_monitor", gdk_display_get_primary_monitor); - LOAD_GTK_SYMBOL(lib, "gdk_monitor_get_scale_factor", gdk_monitor_get_scale_factor); - - LOAD_GTK_SYMBOL(lib, "gdk_pixbuf_new_from_file_at_size", gdk_pixbuf_new_from_file_at_size); - LOAD_GTK_SYMBOL(lib, "gdk_pixbuf_get_has_alpha", gdk_pixbuf_get_has_alpha); - LOAD_GTK_SYMBOL(lib, "gdk_pixbuf_get_pixels", gdk_pixbuf_get_pixels); - LOAD_GTK_SYMBOL(lib, "gdk_pixbuf_get_width", gdk_pixbuf_get_width); - LOAD_GTK_SYMBOL(lib, "gdk_pixbuf_get_height", gdk_pixbuf_get_height); - LOAD_GTK_SYMBOL(lib, "gdk_pixbuf_get_rowstride", gdk_pixbuf_get_rowstride); + LOAD_GTK_SYMBOL(lib, gtk_widget_show); + LOAD_GTK_SYMBOL(lib, gtk_widget_hide); + LOAD_GTK_SYMBOL(lib, gtk_widget_get_window); + LOAD_GTK_SYMBOL(lib, gtk_widget_realize); + LOAD_GTK_SYMBOL(lib, gtk_widget_hide_on_delete); + LOAD_GTK_SYMBOL(lib, gtk_widget_destroy); + LOAD_GTK_SYMBOL(lib, gtk_clipboard_get); + LOAD_GTK_SYMBOL(lib, gtk_clipboard_store); + LOAD_GTK_SYMBOL(lib, gtk_clipboard_wait_for_contents); + LOAD_GTK_SYMBOL(lib, gtk_clipboard_wait_for_image); + LOAD_GTK_SYMBOL(lib, gtk_selection_data_targets_include_image); + LOAD_GTK_SYMBOL(lib, gtk_selection_data_free); + LOAD_GTK_SYMBOL(lib, gtk_file_chooser_dialog_new); + LOAD_GTK_SYMBOL(lib, gtk_file_chooser_get_type); + LOAD_GTK_SYMBOL(lib, gtk_image_get_type); + LOAD_GTK_SYMBOL(lib, gtk_file_chooser_set_current_folder); + LOAD_GTK_SYMBOL(lib, gtk_file_chooser_get_current_folder); + LOAD_GTK_SYMBOL(lib, gtk_file_chooser_set_current_name); + LOAD_GTK_SYMBOL(lib, gtk_file_chooser_select_filename); + LOAD_GTK_SYMBOL(lib, gtk_file_chooser_get_filenames); + LOAD_GTK_SYMBOL(lib, gtk_file_chooser_set_filter); + LOAD_GTK_SYMBOL(lib, gtk_file_chooser_get_filter); + LOAD_GTK_SYMBOL(lib, gtk_window_get_type); + LOAD_GTK_SYMBOL(lib, gtk_window_set_title); + LOAD_GTK_SYMBOL(lib, gtk_file_chooser_set_local_only); + LOAD_GTK_SYMBOL(lib, gtk_file_chooser_set_action); + LOAD_GTK_SYMBOL(lib, gtk_file_chooser_set_select_multiple); + LOAD_GTK_SYMBOL(lib, gtk_file_chooser_set_do_overwrite_confirmation); + LOAD_GTK_SYMBOL(lib, gtk_file_chooser_remove_filter); + LOAD_GTK_SYMBOL(lib, gtk_file_filter_set_name); + LOAD_GTK_SYMBOL(lib, gtk_file_filter_add_pattern); + LOAD_GTK_SYMBOL(lib, gtk_file_chooser_add_filter); + LOAD_GTK_SYMBOL(lib, gtk_file_chooser_set_preview_widget); + LOAD_GTK_SYMBOL(lib, gtk_file_chooser_get_preview_filename); + LOAD_GTK_SYMBOL(lib, gtk_file_chooser_set_preview_widget_active); + LOAD_GTK_SYMBOL(lib, gtk_file_filter_new); + LOAD_GTK_SYMBOL(lib, gtk_image_new); + LOAD_GTK_SYMBOL(lib, gtk_image_set_from_pixbuf); + + LOAD_GTK_SYMBOL(lib, gdk_window_set_modal_hint); + LOAD_GTK_SYMBOL(lib, gdk_window_focus); + LOAD_GTK_SYMBOL(lib, gtk_dialog_get_type); + LOAD_GTK_SYMBOL(lib, gtk_dialog_run); + + LOAD_GTK_SYMBOL(lib, gdk_atom_intern); + + LOAD_GTK_SYMBOL(lib, gdk_display_get_default); + LOAD_GTK_SYMBOL(lib, gdk_display_get_monitor); + LOAD_GTK_SYMBOL(lib, gdk_display_get_primary_monitor); + LOAD_GTK_SYMBOL(lib, gdk_monitor_get_scale_factor); + + LOAD_GTK_SYMBOL(lib, gdk_pixbuf_new_from_file_at_size); + LOAD_GTK_SYMBOL(lib, gdk_pixbuf_get_has_alpha); + LOAD_GTK_SYMBOL(lib, gdk_pixbuf_get_pixels); + LOAD_GTK_SYMBOL(lib, gdk_pixbuf_get_width); + LOAD_GTK_SYMBOL(lib, gdk_pixbuf_get_height); + LOAD_GTK_SYMBOL(lib, gdk_pixbuf_get_rowstride); GdkHelperLoad(lib); - LOAD_GTK_SYMBOL(lib, "gtk_dialog_get_widget_for_response", gtk_dialog_get_widget_for_response); - LOAD_GTK_SYMBOL(lib, "gtk_button_set_label", gtk_button_set_label); - LOAD_GTK_SYMBOL(lib, "gtk_button_get_type", gtk_button_get_type); + LOAD_GTK_SYMBOL(lib, gtk_dialog_get_widget_for_response); + LOAD_GTK_SYMBOL(lib, gtk_button_set_label); + LOAD_GTK_SYMBOL(lib, gtk_button_get_type); - LOAD_GTK_SYMBOL(lib, "gtk_app_chooser_dialog_new", gtk_app_chooser_dialog_new); - LOAD_GTK_SYMBOL(lib, "gtk_app_chooser_get_app_info", gtk_app_chooser_get_app_info); - LOAD_GTK_SYMBOL(lib, "gtk_app_chooser_get_type", gtk_app_chooser_get_type); + LOAD_GTK_SYMBOL(lib, gtk_app_chooser_dialog_new); + LOAD_GTK_SYMBOL(lib, gtk_app_chooser_get_app_info); + LOAD_GTK_SYMBOL(lib, gtk_app_chooser_get_type); Loaded = true; } |